Test Failed
Push — master ( 25adfe...70178c )
by Devin
01:46
created
includes/admin/shortcodes/shortcode-give-login.php 2 patches
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -42,16 +42,16 @@
 block discarded – undo
42 42
 				'minWidth' => 320,
43 43
 				'tooltip'  => esc_attr__( 'Enter an URL here to redirect to after login.', 'give' ),
44 44
 			),
45
-            array(
46
-                'type' => 'container',
47
-                'html' => sprintf( '<p class="no-margin">%s</p>', esc_html__( 'Logout Redirect URL (optional):', 'give' ) ),
48
-            ),
49
-            array(
50
-                'type'     => 'textbox',
51
-                'name'     => 'logout-redirect',
52
-                'minWidth' => 320,
53
-                'tooltip'  => esc_attr__( 'Enter an URL here to redirect to after logout.', 'give' ),
54
-            ),
45
+			array(
46
+				'type' => 'container',
47
+				'html' => sprintf( '<p class="no-margin">%s</p>', esc_html__( 'Logout Redirect URL (optional):', 'give' ) ),
48
+			),
49
+			array(
50
+				'type'     => 'textbox',
51
+				'name'     => 'logout-redirect',
52
+				'minWidth' => 320,
53
+				'tooltip'  => esc_attr__( 'Enter an URL here to redirect to after logout.', 'give' ),
54
+			),
55 55
 		);
56 56
 	}
57 57
 }
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 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
 
@@ -21,10 +21,10 @@  discard block
 block discarded – undo
21 21
 	 */
22 22
 	public function __construct() {
23 23
 
24
-		$this->shortcode['title'] = esc_html__( 'Login', 'give' );
25
-		$this->shortcode['label'] = esc_html__( 'Login', 'give' );
24
+		$this->shortcode['title'] = esc_html__('Login', 'give');
25
+		$this->shortcode['label'] = esc_html__('Login', 'give');
26 26
 
27
-		parent::__construct( 'give_login' );
27
+		parent::__construct('give_login');
28 28
 	}
29 29
 
30 30
 	/**
@@ -37,23 +37,23 @@  discard block
 block discarded – undo
37 37
 		return array(
38 38
 			array(
39 39
 				'type' => 'container',
40
-				'html' => sprintf( '<p class="no-margin">%s</p>', esc_html__( 'Login Redirect URL (optional):', 'give' ) ),
40
+				'html' => sprintf('<p class="no-margin">%s</p>', esc_html__('Login Redirect URL (optional):', 'give')),
41 41
 			),
42 42
 			array(
43 43
 				'type'     => 'textbox',
44 44
 				'name'     => 'login-redirect',
45 45
 				'minWidth' => 320,
46
-				'tooltip'  => esc_attr__( 'Enter an URL here to redirect to after login.', 'give' ),
46
+				'tooltip'  => esc_attr__('Enter an URL here to redirect to after login.', 'give'),
47 47
 			),
48 48
             array(
49 49
                 'type' => 'container',
50
-                'html' => sprintf( '<p class="no-margin">%s</p>', esc_html__( 'Logout Redirect URL (optional):', 'give' ) ),
50
+                'html' => sprintf('<p class="no-margin">%s</p>', esc_html__('Logout Redirect URL (optional):', 'give')),
51 51
             ),
52 52
             array(
53 53
                 'type'     => 'textbox',
54 54
                 'name'     => 'logout-redirect',
55 55
                 'minWidth' => 320,
56
-                'tooltip'  => esc_attr__( 'Enter an URL here to redirect to after logout.', 'give' ),
56
+                'tooltip'  => esc_attr__('Enter an URL here to redirect to after logout.', 'give'),
57 57
             ),
58 58
 		);
59 59
 	}
Please login to merge, or discard this patch.
includes/admin/shortcodes/abstract-shortcode-generator.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -248,8 +248,8 @@
 block discarded – undo
248 248
 
249 249
 			// do not reindex array!
250 250
 			$field['options'] = array(
251
-				                    '' => ( $field['placeholder'] ? $field['placeholder'] : esc_attr__( '- Select -', 'give' ) ),
252
-			                    ) + $field['options'];
251
+									'' => ( $field['placeholder'] ? $field['placeholder'] : esc_attr__( '- Select -', 'give' ) ),
252
+								) + $field['options'];
253 253
 
254 254
 			foreach ( $field['options'] as $value => $text ) {
255 255
 				$new_listbox['values'][] = array(
Please login to merge, or discard this patch.
Spacing   +64 added lines, -64 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
  */
12 12
 
13 13
 // Exit if accessed directly.
14
-if ( ! defined( 'ABSPATH' ) ) {
14
+if ( ! defined('ABSPATH')) {
15 15
 	exit;
16 16
 }
17 17
 
@@ -62,11 +62,11 @@  discard block
 block discarded – undo
62 62
 	 *
63 63
 	 * @since 1.0
64 64
 	 */
65
-	public function __construct( $shortcode ) {
65
+	public function __construct($shortcode) {
66 66
 
67 67
 		$this->shortcode_tag = $shortcode;
68 68
 
69
-		add_action( 'admin_init', array( $this, 'init' ) );
69
+		add_action('admin_init', array($this, 'init'));
70 70
 
71 71
 	}
72 72
 
@@ -77,9 +77,9 @@  discard block
 block discarded – undo
77 77
 	 */
78 78
 	public function init() {
79 79
 
80
-		if ( $this->shortcode_tag ) {
80
+		if ($this->shortcode_tag) {
81 81
 
82
-			$this->self = get_class( $this );
82
+			$this->self = get_class($this);
83 83
 
84 84
 			$this->errors   = array();
85 85
 			$this->required = array();
@@ -88,18 +88,18 @@  discard block
 block discarded – undo
88 88
 			$fields = $this->get_fields();
89 89
 
90 90
 			$defaults = array(
91
-				'btn_close' => esc_html__( 'Close', 'give' ),
92
-				'btn_okay'  => esc_html__( 'Insert Shortcode', 'give' ),
91
+				'btn_close' => esc_html__('Close', 'give'),
92
+				'btn_okay'  => esc_html__('Insert Shortcode', 'give'),
93 93
 				'errors'    => $this->errors,
94 94
 				'fields'    => $fields,
95
-				'label'     => '[' . $this->shortcode_tag . ']',
95
+				'label'     => '['.$this->shortcode_tag.']',
96 96
 				'required'  => $this->required,
97
-				'title'     => esc_html__( 'Insert Shortcode', 'give' ),
97
+				'title'     => esc_html__('Insert Shortcode', 'give'),
98 98
 			);
99 99
 
100
-			if ( user_can_richedit() ) {
100
+			if (user_can_richedit()) {
101 101
 
102
-				Give_Shortcode_Button::$shortcodes[ $this->shortcode_tag ] = wp_parse_args( $this->shortcode, $defaults );
102
+				Give_Shortcode_Button::$shortcodes[$this->shortcode_tag] = wp_parse_args($this->shortcode, $defaults);
103 103
 
104 104
 			}
105 105
 		}
@@ -128,13 +128,13 @@  discard block
 block discarded – undo
128 128
 	 *
129 129
 	 * @since 1.0
130 130
 	 */
131
-	protected function generate_fields( $defined_fields ) {
131
+	protected function generate_fields($defined_fields) {
132 132
 
133 133
 		$fields = array();
134 134
 
135
-		if ( is_array( $defined_fields ) ) {
135
+		if (is_array($defined_fields)) {
136 136
 
137
-			foreach ( $defined_fields as $field ) {
137
+			foreach ($defined_fields as $field) {
138 138
 
139 139
 				$defaults = array(
140 140
 					'label'       => false,
@@ -145,14 +145,14 @@  discard block
 block discarded – undo
145 145
 					'type'        => '',
146 146
 				);
147 147
 
148
-				$field  = wp_parse_args( (array) $field, $defaults );
149
-				$method = 'generate_' . strtolower( $field['type'] );
148
+				$field  = wp_parse_args((array) $field, $defaults);
149
+				$method = 'generate_'.strtolower($field['type']);
150 150
 
151
-				if ( method_exists( $this, $method ) ) {
151
+				if (method_exists($this, $method)) {
152 152
 
153
-					$field = call_user_func( array( $this, $method ), $field );
153
+					$field = call_user_func(array($this, $method), $field);
154 154
 
155
-					if ( $field ) {
155
+					if ($field) {
156 156
 						$fields[] = $field;
157 157
 					}
158 158
 				}
@@ -172,23 +172,23 @@  discard block
 block discarded – undo
172 172
 	protected function get_fields() {
173 173
 
174 174
 		$defined_fields   = $this->define_fields();
175
-		$generated_fields = $this->generate_fields( $defined_fields );
175
+		$generated_fields = $this->generate_fields($defined_fields);
176 176
 
177 177
 		$errors = array();
178 178
 
179
-		if ( ! empty( $this->errors ) ) {
180
-			foreach ( $this->required as $name => $alert ) {
179
+		if ( ! empty($this->errors)) {
180
+			foreach ($this->required as $name => $alert) {
181 181
 				// Using WordPress function in place of array_column wp_list_pluck as it support older version as well.
182
-				if ( false === array_search( $name, give_list_pluck( $generated_fields, 'name' ) ) ) {
182
+				if (false === array_search($name, give_list_pluck($generated_fields, 'name'))) {
183 183
 
184
-					$errors[] = $this->errors[ $name ];
184
+					$errors[] = $this->errors[$name];
185 185
 				}
186 186
 			}
187 187
 
188 188
 			$this->errors = $errors;
189 189
 		}
190 190
 
191
-		if ( ! empty( $errors ) ) {
191
+		if ( ! empty($errors)) {
192 192
 
193 193
 			return $errors;
194 194
 		}
@@ -205,9 +205,9 @@  discard block
 block discarded – undo
205 205
 	 *
206 206
 	 * @since 1.0
207 207
 	 */
208
-	protected function generate_container( $field ) {
208
+	protected function generate_container($field) {
209 209
 
210
-		if ( array_key_exists( 'html', $field ) ) {
210
+		if (array_key_exists('html', $field)) {
211 211
 
212 212
 			return array(
213 213
 				'type' => $field['type'],
@@ -227,9 +227,9 @@  discard block
 block discarded – undo
227 227
 	 *
228 228
 	 * @since 1.0
229 229
 	 */
230
-	protected function generate_listbox( $field ) {
230
+	protected function generate_listbox($field) {
231 231
 
232
-		$listbox = shortcode_atts( array(
232
+		$listbox = shortcode_atts(array(
233 233
 			'label'    => '',
234 234
 			'minWidth' => '',
235 235
 			'name'     => false,
@@ -237,27 +237,27 @@  discard block
 block discarded – undo
237 237
 			'type'     => '',
238 238
 			'value'    => '',
239 239
 			'classes'  => ''
240
-		), $field );
240
+		), $field);
241 241
 
242
-		if ( $this->validate( $field ) ) {
242
+		if ($this->validate($field)) {
243 243
 
244 244
 			$new_listbox = array();
245 245
 
246
-			foreach ( $listbox as $key => $value ) {
246
+			foreach ($listbox as $key => $value) {
247 247
 
248
-				if ( $key == 'value' && empty( $value ) ) {
249
-					$new_listbox[ $key ] = $listbox['name'];
250
-				} else if ( $value ) {
251
-					$new_listbox[ $key ] = $value;
248
+				if ($key == 'value' && empty($value)) {
249
+					$new_listbox[$key] = $listbox['name'];
250
+				} else if ($value) {
251
+					$new_listbox[$key] = $value;
252 252
 				}
253 253
 			}
254 254
 
255 255
 			// do not reindex array!
256 256
 			$field['options'] = array(
257
-				                    '' => ( $field['placeholder'] ? $field['placeholder'] : esc_attr__( '- Select -', 'give' ) ),
257
+				                    '' => ($field['placeholder'] ? $field['placeholder'] : esc_attr__('- Select -', 'give')),
258 258
 			                    ) + $field['options'];
259 259
 
260
-			foreach ( $field['options'] as $value => $text ) {
260
+			foreach ($field['options'] as $value => $text) {
261 261
 				$new_listbox['values'][] = array(
262 262
 					'text'  => $text,
263 263
 					'value' => $value,
@@ -279,7 +279,7 @@  discard block
 block discarded – undo
279 279
 	 *
280 280
 	 * @since 1.0
281 281
 	 */
282
-	protected function generate_post( $field ) {
282
+	protected function generate_post($field) {
283 283
 
284 284
 		$args = array(
285 285
 			'post_type'      => 'post',
@@ -288,23 +288,23 @@  discard block
 block discarded – undo
288 288
 			'posts_per_page' => 30,
289 289
 		);
290 290
 
291
-		$args    = wp_parse_args( (array) $field['query_args'], $args );
292
-		$posts   = get_posts( $args );
291
+		$args    = wp_parse_args((array) $field['query_args'], $args);
292
+		$posts   = get_posts($args);
293 293
 		$options = array();
294 294
 
295
-		if ( $posts ) {
296
-			foreach ( $posts as $post ) {
297
-				$options[ absint( $post->ID ) ] = ( empty( $post->post_title ) ? sprintf( __( 'Untitled (#%s)', 'give' ), $post->ID ) : $post->post_title );
295
+		if ($posts) {
296
+			foreach ($posts as $post) {
297
+				$options[absint($post->ID)] = (empty($post->post_title) ? sprintf(__('Untitled (#%s)', 'give'), $post->ID) : $post->post_title);
298 298
 			}
299 299
 
300 300
 			$field['type']    = 'listbox';
301 301
 			$field['options'] = $options;
302 302
 
303
-			return $this->generate_listbox( $field );
303
+			return $this->generate_listbox($field);
304 304
 		}
305 305
 
306 306
 		// perform validation here before returning false
307
-		$this->validate( $field );
307
+		$this->validate($field);
308 308
 
309 309
 		return false;
310 310
 	}
@@ -318,9 +318,9 @@  discard block
 block discarded – undo
318 318
 	 *
319 319
 	 * @since 1.0
320 320
 	 */
321
-	protected function generate_textbox( $field ) {
321
+	protected function generate_textbox($field) {
322 322
 
323
-		$textbox = shortcode_atts( array(
323
+		$textbox = shortcode_atts(array(
324 324
 			'label'     => '',
325 325
 			'maxLength' => '',
326 326
 			'minHeight' => '',
@@ -331,10 +331,10 @@  discard block
 block discarded – undo
331 331
 			'type'      => '',
332 332
 			'value'     => '',
333 333
 			'classes'   => ''
334
-		), $field );
334
+		), $field);
335 335
 
336
-		if ( $this->validate( $field ) ) {
337
-			return array_filter( $textbox, array( $this, 'return_textbox_value' ) );
336
+		if ($this->validate($field)) {
337
+			return array_filter($textbox, array($this, 'return_textbox_value'));
338 338
 		}
339 339
 
340 340
 		return false;
@@ -347,7 +347,7 @@  discard block
 block discarded – undo
347 347
 	 *
348 348
 	 * @return bool
349 349
 	 */
350
-	function return_textbox_value( $value ) {
350
+	function return_textbox_value($value) {
351 351
 		return $value !== '';
352 352
 	}
353 353
 
@@ -363,9 +363,9 @@  discard block
 block discarded – undo
363 363
 	 *
364 364
 	 * @since 1.0
365 365
 	 */
366
-	protected function validate( $field ) {
366
+	protected function validate($field) {
367 367
 
368
-		extract( shortcode_atts(
368
+		extract(shortcode_atts(
369 369
 				array(
370 370
 					'name'     => false,
371 371
 					'required' => false,
@@ -373,36 +373,36 @@  discard block
 block discarded – undo
373 373
 				), $field )
374 374
 		);
375 375
 
376
-		if ( $name ) {
376
+		if ($name) {
377 377
 
378
-			if ( isset( $required['error'] ) ) {
378
+			if (isset($required['error'])) {
379 379
 
380 380
 				$error = array(
381 381
 					'type' => 'container',
382 382
 					'html' => $required['error'],
383 383
 				);
384 384
 
385
-				$this->errors[ $name ] = $this->generate_container( $error );
385
+				$this->errors[$name] = $this->generate_container($error);
386 386
 			}
387 387
 
388
-			if ( ! ! $required || is_array( $required ) ) {
388
+			if ( ! ! $required || is_array($required)) {
389 389
 
390
-				$alert = esc_html__( 'Some of the shortcode options are required.', 'give' );
390
+				$alert = esc_html__('Some of the shortcode options are required.', 'give');
391 391
 
392
-				if ( isset( $required['alert'] ) ) {
392
+				if (isset($required['alert'])) {
393 393
 
394 394
 					$alert = $required['alert'];
395 395
 
396
-				} else if ( ! empty( $label ) ) {
396
+				} else if ( ! empty($label)) {
397 397
 
398 398
 					$alert = sprintf(
399 399
 					/* translators: %s: option label */
400
-						esc_html__( 'The "%s" option is required.', 'give' ),
401
-						str_replace( ':', '', $label )
400
+						esc_html__('The "%s" option is required.', 'give'),
401
+						str_replace(':', '', $label)
402 402
 					);
403 403
 				}
404 404
 
405
-				$this->required[ $name ] = $alert;
405
+				$this->required[$name] = $alert;
406 406
 			}
407 407
 
408 408
 			return true;
Please login to merge, or discard this patch.
includes/emails/actions.php 1 patch
Spacing   +18 added lines, -18 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,17 +23,17 @@  discard block
 block discarded – undo
23 23
  *
24 24
  * @return void
25 25
  */
26
-function give_trigger_donation_receipt( $payment_id ) {
26
+function give_trigger_donation_receipt($payment_id) {
27 27
 	// Make sure we don't send a receipt while editing a donation.
28
-	if ( isset( $_POST['give-action'] ) && 'edit_payment' == $_POST['give-action'] ) {
28
+	if (isset($_POST['give-action']) && 'edit_payment' == $_POST['give-action']) {
29 29
 		return;
30 30
 	}
31 31
 
32 32
 	// Send email.
33
-	give_email_donation_receipt( $payment_id );
33
+	give_email_donation_receipt($payment_id);
34 34
 }
35 35
 
36
-add_action( 'give_complete_donation', 'give_trigger_donation_receipt', 999, 1 );
36
+add_action('give_complete_donation', 'give_trigger_donation_receipt', 999, 1);
37 37
 
38 38
 /**
39 39
  * Resend the Email Donation Receipt. (This can be done from the Donation History Page)
@@ -44,29 +44,29 @@  discard block
 block discarded – undo
44 44
  *
45 45
  * @return void
46 46
  */
47
-function give_resend_donation_receipt( $data ) {
47
+function give_resend_donation_receipt($data) {
48 48
 
49
-	$purchase_id = absint( $data['purchase_id'] );
49
+	$purchase_id = absint($data['purchase_id']);
50 50
 
51
-	if ( empty( $purchase_id ) ) {
51
+	if (empty($purchase_id)) {
52 52
 		return;
53 53
 	}
54 54
 
55
-	if ( ! current_user_can( 'edit_give_payments', $purchase_id ) ) {
56
-		wp_die( esc_html__( 'You do not have permission to edit payments.', 'give' ), esc_html__( 'Error', 'give' ), array( 'response' => 403 ) );
55
+	if ( ! current_user_can('edit_give_payments', $purchase_id)) {
56
+		wp_die(esc_html__('You do not have permission to edit payments.', 'give'), esc_html__('Error', 'give'), array('response' => 403));
57 57
 	}
58 58
 
59
-	give_email_donation_receipt( $purchase_id, false );
59
+	give_email_donation_receipt($purchase_id, false);
60 60
 
61
-	wp_redirect( add_query_arg( array(
61
+	wp_redirect(add_query_arg(array(
62 62
 		'give-message' => 'email_sent',
63 63
 		'give-action'  => false,
64 64
 		'purchase_id'  => false
65
-	) ) );
65
+	)));
66 66
 	exit;
67 67
 }
68 68
 
69
-add_action( 'give_email_links', 'give_resend_donation_receipt' );
69
+add_action('give_email_links', 'give_resend_donation_receipt');
70 70
 
71 71
 /**
72 72
  * Trigger the sending of a Test Email
@@ -77,8 +77,8 @@  discard block
 block discarded – undo
77 77
  *
78 78
  * @return void
79 79
  */
80
-function give_send_test_email( $data ) {
81
-	if ( ! wp_verify_nonce( $data['_wpnonce'], 'give-test-email' ) ) {
80
+function give_send_test_email($data) {
81
+	if ( ! wp_verify_nonce($data['_wpnonce'], 'give-test-email')) {
82 82
 		return;
83 83
 	}
84 84
 
@@ -86,8 +86,8 @@  discard block
 block discarded – undo
86 86
 	give_email_test_donation_receipt();
87 87
 
88 88
 	// Remove the test email query arg.
89
-	wp_redirect( remove_query_arg( 'give_action' ) );
89
+	wp_redirect(remove_query_arg('give_action'));
90 90
 	exit;
91 91
 }
92 92
 
93
-add_action( 'give_send_test_email', 'give_send_test_email' );
93
+add_action('give_send_test_email', 'give_send_test_email');
Please login to merge, or discard this patch.
includes/admin/settings/class-settings-cmb2-backward-compatibility.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -85,7 +85,7 @@
 block discarded – undo
85 85
 		 *
86 86
 		 * @since  1.8
87 87
 		 *
88
-		 * @param  $setting_tab
88
+		 * @param  string $setting_tab
89 89
 		 *
90 90
 		 * @return string
91 91
 		 */
Please login to merge, or discard this patch.
Spacing   +126 added lines, -126 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
  * @since       1.8
10 10
  */
11 11
 
12
-if ( ! class_exists( 'Give_CMB2_Settings_Loader' ) ) :
12
+if ( ! class_exists('Give_CMB2_Settings_Loader')) :
13 13
 
14 14
 	/**
15 15
 	 * This class loads the cmb2 settings.
@@ -52,30 +52,30 @@  discard block
 block discarded – undo
52 52
 
53 53
 			// Get current tab.
54 54
 			$this->current_tab     = give_get_current_setting_tab();
55
-			$this->current_section = empty( $_REQUEST['section'] ) ? ( current( array_keys( $this->get_sections() ) ) ) : sanitize_title( $_REQUEST['section'] );
55
+			$this->current_section = empty($_REQUEST['section']) ? (current(array_keys($this->get_sections()))) : sanitize_title($_REQUEST['section']);
56 56
 
57 57
 			// Tab ID.
58 58
 			$this->id = $this->current_tab;
59 59
 
60 60
 			// Add addon tabs.
61
-			add_filter( 'give-settings_tabs_array', array( $this, 'add_addon_settings_page' ), 999999 );
61
+			add_filter('give-settings_tabs_array', array($this, 'add_addon_settings_page'), 999999);
62 62
 
63 63
 			// Add save hook to addons.
64
-			add_action( 'give-settings_get_settings_pages', array( $this, 'setup_addon_save_hook' ), 999999 );
64
+			add_action('give-settings_get_settings_pages', array($this, 'setup_addon_save_hook'), 999999);
65 65
 
66 66
 			// Add backward compatibility filters plugin settings.
67
-			$setting_tabs = array( 'general', 'gateways', 'display', 'emails', 'addons', 'licenses' );
67
+			$setting_tabs = array('general', 'gateways', 'display', 'emails', 'addons', 'licenses');
68 68
 
69 69
 			// Filter Payment Gateways settings.
70
-			if ( in_array( $this->current_tab, $setting_tabs ) ) {
71
-				add_filter( "give_get_settings_{$this->current_tab}", array(
70
+			if (in_array($this->current_tab, $setting_tabs)) {
71
+				add_filter("give_get_settings_{$this->current_tab}", array(
72 72
 					$this,
73 73
 					'get_filtered_addon_settings',
74
-				), 999999, 1 );
75
-				add_filter( "give_get_sections_{$this->current_tab}", array(
74
+				), 999999, 1);
75
+				add_filter("give_get_sections_{$this->current_tab}", array(
76 76
 					$this,
77 77
 					'get_filtered_addon_sections',
78
-				), 999999, 1 );
78
+				), 999999, 1);
79 79
 			}
80 80
 		}
81 81
 
@@ -88,12 +88,12 @@  discard block
 block discarded – undo
88 88
 		 *
89 89
 		 * @return string
90 90
 		 */
91
-		function set_default_setting_tab( $setting_tab ) {
91
+		function set_default_setting_tab($setting_tab) {
92 92
 			$default_tab = '';
93 93
 
94 94
 			// Set default tab to first setting tab.
95
-			if ( $sections = array_keys( $this->get_sections() ) ) {
96
-				$default_tab = current( $sections );
95
+			if ($sections = array_keys($this->get_sections())) {
96
+				$default_tab = current($sections);
97 97
 			}
98 98
 
99 99
 			return $default_tab;
@@ -108,29 +108,29 @@  discard block
 block discarded – undo
108 108
 		 *
109 109
 		 * @return mixed
110 110
 		 */
111
-		function add_addon_settings_page( $pages ) {
111
+		function add_addon_settings_page($pages) {
112 112
 			// Previous setting page.
113 113
 			$previous_pages = $this->prev_settings->give_get_settings_tabs();
114 114
 
115 115
 			// API and System Info setting tab merge to Tools setting tab, so remove them from tabs.
116
-			unset( $previous_pages['api'] );
117
-			unset( $previous_pages['system_info'] );
116
+			unset($previous_pages['api']);
117
+			unset($previous_pages['system_info']);
118 118
 
119 119
 			// Tab is not register.
120
-			$pages_diff = array_keys( array_diff( $previous_pages, $pages ) );
120
+			$pages_diff = array_keys(array_diff($previous_pages, $pages));
121 121
 
122 122
 			// Merge old settings with new settings.
123
-			$pages = array_merge( $pages, $previous_pages );
123
+			$pages = array_merge($pages, $previous_pages);
124 124
 
125
-			if ( in_array( $this->current_tab, $pages_diff ) ) {
125
+			if (in_array($this->current_tab, $pages_diff)) {
126 126
 				// Filter & actions.
127
-				add_filter( "give_default_setting_tab_section_{$this->current_tab}", array(
127
+				add_filter("give_default_setting_tab_section_{$this->current_tab}", array(
128 128
 					$this,
129 129
 					'set_default_setting_tab',
130
-				), 10 );
131
-				add_action( "give-settings_sections_{$this->current_tab}_page", array( $this, 'output_sections' ) );
132
-				add_action( "give-settings_settings_{$this->current_tab}_page", array( $this, 'output' ), 10 );
133
-				add_action( "give-settings_save_{$this->current_tab}", array( $this, 'save' ) );
130
+				), 10);
131
+				add_action("give-settings_sections_{$this->current_tab}_page", array($this, 'output_sections'));
132
+				add_action("give-settings_settings_{$this->current_tab}_page", array($this, 'output'), 10);
133
+				add_action("give-settings_save_{$this->current_tab}", array($this, 'save'));
134 134
 			}
135 135
 
136 136
 			return $pages;
@@ -146,29 +146,29 @@  discard block
 block discarded – undo
146 146
 		 *
147 147
 		 * @return mixed
148 148
 		 */
149
-		function setup_addon_save_hook( $pages ) {
149
+		function setup_addon_save_hook($pages) {
150 150
 			$page_ids = array();
151 151
 
152
-			foreach ( $pages as $page ) {
153
-				$page_ids = $page->add_settings_page( $page_ids );
152
+			foreach ($pages as $page) {
153
+				$page_ids = $page->add_settings_page($page_ids);
154 154
 			}
155 155
 
156 156
 			// Previous setting page.
157 157
 			$previous_pages = $this->prev_settings->give_get_settings_tabs();
158 158
 
159 159
 			// API and System Info setting tab merge to Tools setting tab, so remove them from tabs.
160
-			unset( $previous_pages['api'] );
161
-			unset( $previous_pages['system_info'] );
160
+			unset($previous_pages['api']);
161
+			unset($previous_pages['system_info']);
162 162
 
163 163
 			// Tab is not register.
164
-			$pages_diff = array_keys( array_diff( $previous_pages, $page_ids ) );
164
+			$pages_diff = array_keys(array_diff($previous_pages, $page_ids));
165 165
 
166 166
 			// Merge old settings with new settings.
167
-			$pages = array_merge( $page_ids, $previous_pages );
167
+			$pages = array_merge($page_ids, $previous_pages);
168 168
 
169
-			if ( in_array( $this->current_tab, $pages_diff ) ) {
169
+			if (in_array($this->current_tab, $pages_diff)) {
170 170
 				// Filter & actions.
171
-				add_action( "give-settings_save_{$this->current_tab}", array( $this, 'save' ) );
171
+				add_action("give-settings_save_{$this->current_tab}", array($this, 'save'));
172 172
 			}
173 173
 
174 174
 			return $pages;
@@ -183,16 +183,16 @@  discard block
 block discarded – undo
183 183
 		 *
184 184
 		 * @return string
185 185
 		 */
186
-		function get_section_name( $field_name ) {
186
+		function get_section_name($field_name) {
187 187
 			// Bailout.
188
-			if ( empty( $field_name ) ) {
188
+			if (empty($field_name)) {
189 189
 				return $field_name;
190 190
 			}
191 191
 
192
-			$section_name = explode( ' ', $field_name );
192
+			$section_name = explode(' ', $field_name);
193 193
 
194 194
 			// Output.
195
-			return strip_tags( implode( ' ', $section_name ) );
195
+			return strip_tags(implode(' ', $section_name));
196 196
 		}
197 197
 
198 198
 
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
 		 *
208 208
 		 * @return mixed
209 209
 		 */
210
-		public function en_translation( $translation, $text ) {
210
+		public function en_translation($translation, $text) {
211 211
 			return $text;
212 212
 		}
213 213
 
@@ -221,52 +221,52 @@  discard block
 block discarded – undo
221 221
 		 *
222 222
 		 * @return mixed
223 223
 		 */
224
-		function get_filtered_addon_sections( $sections = array() ) {
224
+		function get_filtered_addon_sections($sections = array()) {
225 225
 			// New sections.
226 226
 			$new_sections = array();
227
-			$sections_ID  = array_keys( $sections );
228
-			$setting_fields = $this->prev_settings->give_settings( $this->current_tab );
227
+			$sections_ID  = array_keys($sections);
228
+			$setting_fields = $this->prev_settings->give_settings($this->current_tab);
229 229
 
230 230
 			// We need untranslated settings for backward compatibility.
231
-			add_filter( 'gettext', array( $this, 'en_translation' ), 10, 2 );
232
-			$en_setting_fields = $this->prev_settings->give_settings( $this->current_tab );
233
-			remove_filter( 'gettext', array( $this, 'en_translation' ), 10, 2 );
231
+			add_filter('gettext', array($this, 'en_translation'), 10, 2);
232
+			$en_setting_fields = $this->prev_settings->give_settings($this->current_tab);
233
+			remove_filter('gettext', array($this, 'en_translation'), 10, 2);
234 234
 			
235
-			if ( ! empty( $setting_fields ) && ! empty( $setting_fields['fields'] ) ) {
235
+			if ( ! empty($setting_fields) && ! empty($setting_fields['fields'])) {
236 236
 
237
-				foreach ( $setting_fields['fields'] as $index => $field ) {
237
+				foreach ($setting_fields['fields'] as $index => $field) {
238 238
 					// Collect new sections from addons.
239
-					if ( 'give_title' !== $field['type'] ) {
239
+					if ('give_title' !== $field['type']) {
240 240
 						continue;
241 241
 					}
242 242
 
243 243
 					// Untranslated setting name.
244
-					$en_setting_field_name = isset( $en_setting_fields['fields'][ $index ]['name'] ) ? $en_setting_fields['fields'][ $index ]['name'] : '';
244
+					$en_setting_field_name = isset($en_setting_fields['fields'][$index]['name']) ? $en_setting_fields['fields'][$index]['name'] : '';
245 245
 
246 246
 					// Section name.
247
-					$field['name'] = isset( $field['name'] ) ? $field['name'] : '';
248
-					$section_name  = $this->get_section_name( $field['name'] );
247
+					$field['name'] = isset($field['name']) ? $field['name'] : '';
248
+					$section_name  = $this->get_section_name($field['name']);
249 249
 
250 250
 					// Check if section name exit and section title array is not empty.
251
-					if ( ! empty( $sections ) && ! empty( $en_setting_field_name ) ) {
251
+					if ( ! empty($sections) && ! empty($en_setting_field_name)) {
252 252
 
253 253
 						// Bailout: Do not load section if it is already exist.
254 254
 						if (
255
-							in_array( sanitize_title( $en_setting_field_name ), $sections_ID ) // Check section id.
256
-							|| in_array( $section_name, $sections )                            // Check section name.
255
+							in_array(sanitize_title($en_setting_field_name), $sections_ID) // Check section id.
256
+							|| in_array($section_name, $sections)                            // Check section name.
257 257
 						) {
258 258
 							continue;
259 259
 						}
260 260
 					}
261 261
 
262 262
 					// Collect new sections from addons.
263
-					$new_sections[ sanitize_title( $field['name'] ) ] = $section_name;
263
+					$new_sections[sanitize_title($field['name'])] = $section_name;
264 264
 				}
265 265
 			}
266 266
 
267 267
 			// Add new section.
268
-			if ( ! empty( $new_sections ) ) {
269
-				$sections = array_merge( $sections, $new_sections );
268
+			if ( ! empty($new_sections)) {
269
+				$sections = array_merge($sections, $new_sections);
270 270
 			}
271 271
 
272 272
 			// Output.
@@ -284,19 +284,19 @@  discard block
 block discarded – undo
284 284
 		 *
285 285
 		 * @return array
286 286
 		 */
287
-		function get_filtered_addon_settings( $settings, $setting_fields = array() ) {
287
+		function get_filtered_addon_settings($settings, $setting_fields = array()) {
288 288
 			global $wp_filter;
289 289
 
290 290
 			$new_setting_fields = array();
291 291
 
292
-			if ( ! empty( $settings ) ) {
292
+			if ( ! empty($settings)) {
293 293
 				// Bailout: If setting array contain first element of type title then it means it is already created with new setting api (skip this section ).
294
-				if ( isset( $settings[0]['type'] ) && 'title' == $settings[0]['type'] ) {
295
-					foreach ( $settings as $setting ) {
294
+				if (isset($settings[0]['type']) && 'title' == $settings[0]['type']) {
295
+					foreach ($settings as $setting) {
296 296
 						$new_setting_fields[] = $setting;
297 297
 
298 298
 						// We need setting only till first section end.
299
-						if ( 'sectionend' === $setting['type'] ) {
299
+						if ('sectionend' === $setting['type']) {
300 300
 							break;
301 301
 						}
302 302
 					}
@@ -308,24 +308,24 @@  discard block
 block discarded – undo
308 308
 				$prev_title_field_id = '';
309 309
 
310 310
 				// Create new setting fields.
311
-				foreach ( $settings as $index => $field ) {
311
+				foreach ($settings as $index => $field) {
312 312
 
313 313
 					// Bailout: Must need field type to process.
314
-					if ( ! isset( $field['type'] ) ) {
314
+					if ( ! isset($field['type'])) {
315 315
 						continue;
316 316
 					}
317 317
 
318 318
 					// Set wrapper class if any.
319
-					if ( ! empty( $field['row_classes'] ) ) {
319
+					if ( ! empty($field['row_classes'])) {
320 320
 						$field['wrapper_class'] = $field['row_classes'];
321
-						unset( $field['row_classes'] );
321
+						unset($field['row_classes']);
322 322
 					}
323 323
 
324
-					$field['name'] = ! isset( $field['name'] ) ? '' : $field['name'];
325
-					$field['desc'] = ! isset( $field['desc'] ) ? '' : $field['desc'];
324
+					$field['name'] = ! isset($field['name']) ? '' : $field['name'];
325
+					$field['desc'] = ! isset($field['desc']) ? '' : $field['desc'];
326 326
 
327 327
 					// Modify cmb2 setting fields.
328
-					switch ( $field['type'] ) {
328
+					switch ($field['type']) {
329 329
 						case 'text' :
330 330
 						case 'file' :
331 331
 							$field['css'] = 'width:25em;';
@@ -349,18 +349,18 @@  discard block
 block discarded – undo
349 349
 							$field['type'] = 'title';
350 350
 
351 351
 							// Since we are showing sections, so there now ned to show horizontal rules.
352
-							if ( '<hr>' === $field['desc'] ) {
352
+							if ('<hr>' === $field['desc']) {
353 353
 								$field['desc'] = '';
354 354
 							}
355 355
 
356 356
 							break;
357 357
 					}
358 358
 
359
-					if ( 'title' === $field['type'] ) {
359
+					if ('title' === $field['type']) {
360 360
 
361 361
 						// If we do not have first element as title then these field will be skip from frontend
362 362
 						// because there are not belong to any section, so put all abandon fields under first section.
363
-						if ( $index && empty( $prev_title_field_id ) ) {
363
+						if ($index && empty($prev_title_field_id)) {
364 364
 							array_unshift(
365 365
 								$new_setting_fields,
366 366
 								array(
@@ -374,7 +374,7 @@  discard block
 block discarded – undo
374 374
 							$prev_title_field_id = $field['id'];
375 375
 
376 376
 							continue;
377
-						} elseif ( $index ) {
377
+						} elseif ($index) {
378 378
 							// Section end.
379 379
 							$new_setting_fields[] = array(
380 380
 								'type' => 'sectionend',
@@ -406,52 +406,52 @@  discard block
 block discarded – undo
406 406
 
407 407
 				// Check if setting page has title section or not.
408 408
 				// If setting page does not have title section  then add title section to it and fix section end array id.
409
-				if ( 'title' !== $new_setting_fields[0]['type'] ) {
409
+				if ('title' !== $new_setting_fields[0]['type']) {
410 410
 					array_unshift(
411 411
 						$new_setting_fields,
412 412
 						array(
413
-							'title' => ( isset( $settings['give_title'] ) ? $settings['give_title'] : '' ),
413
+							'title' => (isset($settings['give_title']) ? $settings['give_title'] : ''),
414 414
 							'type'  => 'title',
415
-							'desc'  => ! empty( $setting_fields['desc'] ) ? $setting_fields['desc'] : '',
416
-							'id'    => ( isset( $settings['id'] ) ? $settings['id'] : '' ),
415
+							'desc'  => ! empty($setting_fields['desc']) ? $setting_fields['desc'] : '',
416
+							'id'    => (isset($settings['id']) ? $settings['id'] : ''),
417 417
 						)
418 418
 					);
419 419
 
420 420
 					// Update id in section end array if does not contain.
421
-					if ( empty( $new_setting_fields[ count( $new_setting_fields ) - 1 ]['id'] ) ) {
422
-						$new_setting_fields[ count( $new_setting_fields ) - 1 ]['id'] = ( isset( $settings['id'] ) ? $settings['id'] : '' );
421
+					if (empty($new_setting_fields[count($new_setting_fields) - 1]['id'])) {
422
+						$new_setting_fields[count($new_setting_fields) - 1]['id'] = (isset($settings['id']) ? $settings['id'] : '');
423 423
 					}
424 424
 				}
425 425
 
426 426
 				// Return only section related settings.
427
-				if ( $sections = $this->get_filtered_addon_sections() ) {
428
-					$new_setting_fields = $this->get_section_settings( $new_setting_fields );
427
+				if ($sections = $this->get_filtered_addon_sections()) {
428
+					$new_setting_fields = $this->get_section_settings($new_setting_fields);
429 429
 				}
430 430
 
431 431
 				// Third party plugin backward compatibility.
432
-				$wp_filter_keys = array_keys( $wp_filter );
433
-				foreach ( $new_setting_fields as $index => $field ) {
434
-					if ( ! isset( $field['type'] ) || in_array( $field['type'], array( 'title', 'sectionend' ) ) ) {
432
+				$wp_filter_keys = array_keys($wp_filter);
433
+				foreach ($new_setting_fields as $index => $field) {
434
+					if ( ! isset($field['type']) || in_array($field['type'], array('title', 'sectionend'))) {
435 435
 						continue;
436 436
 					}
437 437
 
438 438
 					$cmb2_filter_name = "cmb2_render_{$field['type']}";
439 439
 
440
-					if ( in_array( $cmb2_filter_name, $wp_filter_keys ) ) {
440
+					if (in_array($cmb2_filter_name, $wp_filter_keys)) {
441 441
 
442
-						if ( 0 >= version_compare( 4.7, get_bloginfo( 'version' ) ) && ! empty( $wp_filter[ $cmb2_filter_name ]->callbacks ) ) {
443
-							$cmb2_filter_arr = current( $wp_filter[ $cmb2_filter_name ]->callbacks );
442
+						if (0 >= version_compare(4.7, get_bloginfo('version')) && ! empty($wp_filter[$cmb2_filter_name]->callbacks)) {
443
+							$cmb2_filter_arr = current($wp_filter[$cmb2_filter_name]->callbacks);
444 444
 						} else {
445
-							$cmb2_filter_arr = current( $wp_filter[ $cmb2_filter_name ] );
445
+							$cmb2_filter_arr = current($wp_filter[$cmb2_filter_name]);
446 446
 						}
447 447
 
448
-						if ( ! empty( $cmb2_filter_arr ) ) {
448
+						if ( ! empty($cmb2_filter_arr)) {
449 449
 							// Note: function can be called either globally or with class object, it depends on how developer invoke it.
450
-							$new_setting_fields[ $index ]['func'] = current( $cmb2_filter_arr );
451
-							add_action( "give_admin_field_{$field['type']}", array(
450
+							$new_setting_fields[$index]['func'] = current($cmb2_filter_arr);
451
+							add_action("give_admin_field_{$field['type']}", array(
452 452
 								$this,
453 453
 								'addon_setting_field',
454
-							), 10, 2 );
454
+							), 10, 2);
455 455
 						}
456 456
 					}
457 457
 				}
@@ -472,31 +472,31 @@  discard block
 block discarded – undo
472 472
 		 *
473 473
 		 * @return array
474 474
 		 */
475
-		function get_section_settings( $tab_settings ) {
475
+		function get_section_settings($tab_settings) {
476 476
 			$current_section = give_get_current_setting_section();
477 477
 
478 478
 			// Note: If we are opening default tab for addon setting then it is possible that we will get empty string as current section
479 479
 			// because default section filter added after save hook fire, so we will always get problem to save first section [default] or if there are only on section
480 480
 			// This is hack to fix this.
481
-			if ( empty( $current_section ) ) {
482
-				$current_section = $this->set_default_setting_tab( $current_section );
481
+			if (empty($current_section)) {
482
+				$current_section = $this->set_default_setting_tab($current_section);
483 483
 			}
484 484
 
485 485
 			$section_start               = false;
486 486
 			$section_end                 = false;
487 487
 			$section_only_setting_fields = array();
488 488
 
489
-			foreach ( $tab_settings as $field ) {
490
-				if ( 'title' == $field['type'] && $current_section == sanitize_title( $field['title'] ) ) {
489
+			foreach ($tab_settings as $field) {
490
+				if ('title' == $field['type'] && $current_section == sanitize_title($field['title'])) {
491 491
 					$section_start = true;
492 492
 				}
493 493
 
494
-				if ( ! $section_start || $section_end ) {
494
+				if ( ! $section_start || $section_end) {
495 495
 					continue;
496 496
 				}
497 497
 
498
-				if ( $section_start && ! $section_end ) {
499
-					if ( 'sectionend' == $field['type'] ) {
498
+				if ($section_start && ! $section_end) {
499
+					if ('sectionend' == $field['type']) {
500 500
 						$section_end = true;
501 501
 					}
502 502
 					$section_only_setting_fields[] = $field;
@@ -506,7 +506,7 @@  discard block
 block discarded – undo
506 506
 			// Remove title from setting, prevent it from render in setting tab.
507 507
 			$section_only_setting_fields[0]['title'] = '';
508 508
 
509
-			return apply_filters( "give_get_settings_{$this->current_tab}_{$current_section}", $section_only_setting_fields, $tab_settings );
509
+			return apply_filters("give_get_settings_{$this->current_tab}_{$current_section}", $section_only_setting_fields, $tab_settings);
510 510
 		}
511 511
 
512 512
 
@@ -520,17 +520,17 @@  discard block
 block discarded – undo
520 520
 		 *
521 521
 		 * @return void
522 522
 		 */
523
-		function addon_setting_field( $field, $saved_value ) {
523
+		function addon_setting_field($field, $saved_value) {
524 524
 			// Create object for cmb2  function callback backward compatibility.
525 525
 			// Note: Do not call any cmb2 function on these objects
526
-			$field_obj      = (object) array( 'args' => $field );
527
-			$field_type_obj = (object) array( 'field' => $field_obj );
526
+			$field_obj      = (object) array('args' => $field);
527
+			$field_type_obj = (object) array('field' => $field_obj);
528 528
 
529
-			switch ( $this->current_tab ) :
529
+			switch ($this->current_tab) :
530 530
 				case 'licenses':
531 531
 					?>
532 532
 					<div class="give-settings-wrap give-settings-wrap-<?php echo $this->current_tab; ?>">
533
-						<?php $field['func']['function']( $field_obj, $saved_value, '', '', $field_type_obj ); ?>
533
+						<?php $field['func']['function']($field_obj, $saved_value, '', '', $field_type_obj); ?>
534 534
 					</div>
535 535
 					<?php break;
536 536
 
@@ -538,22 +538,22 @@  discard block
 block discarded – undo
538 538
 					$colspan = 'colspan="2"';
539 539
 					?>
540 540
 					<tr valign="top">
541
-						<?php if ( ! empty( $field['name'] ) && ! in_array( $field['name'], array( '&nbsp;' ) ) ) : ?>
541
+						<?php if ( ! empty($field['name']) && ! in_array($field['name'], array('&nbsp;'))) : ?>
542 542
 							<th scope="row" class="titledesc">
543 543
 								<label
544
-										for="<?php echo esc_attr( $field['name'] ); ?>"><?php echo $field['title']; ?></label>
544
+										for="<?php echo esc_attr($field['name']); ?>"><?php echo $field['title']; ?></label>
545 545
 							</th>
546 546
 							<?php $colspan = ''; ?>
547 547
 						<?php endif; ?>
548 548
 						<td class="give-forminp" <?php echo $colspan; ?>>
549 549
 							<?php
550
-							if ( is_array( $field['func']['function'] ) ) {
550
+							if (is_array($field['func']['function'])) {
551 551
 								$classname = $field['func']['function'][0];
552 552
 								$function_name = $field['func']['function'][1];
553
-								$classname->$function_name( $field_obj, $saved_value, '', '', $field_type_obj );
553
+								$classname->$function_name($field_obj, $saved_value, '', '', $field_type_obj);
554 554
 							} else {
555 555
 								$function_name = $field['func']['function'];
556
-								$function_name( $field_obj, $saved_value, '', '', $field_type_obj );
556
+								$function_name($field_obj, $saved_value, '', '', $field_type_obj);
557 557
 							}
558 558
 							?>
559 559
 						</td>
@@ -571,10 +571,10 @@  discard block
 block discarded – undo
571 571
 		public function get_sections() {
572 572
 			$sections = array();
573 573
 
574
-			if ( ( $setting_fields = $this->prev_settings->give_settings( $this->current_tab ) ) && ! empty( $setting_fields['fields'] ) ) {
575
-				foreach ( $setting_fields['fields'] as $field ) {
576
-					if ( 'give_title' == $field['type'] ) {
577
-						$sections[ sanitize_title( $field['name'] ) ] = $this->get_section_name( $field['name'] );
574
+			if (($setting_fields = $this->prev_settings->give_settings($this->current_tab)) && ! empty($setting_fields['fields'])) {
575
+				foreach ($setting_fields['fields'] as $field) {
576
+					if ('give_title' == $field['type']) {
577
+						$sections[sanitize_title($field['name'])] = $this->get_section_name($field['name']);
578 578
 					}
579 579
 				}
580 580
 			}
@@ -594,16 +594,16 @@  discard block
 block discarded – undo
594 594
 
595 595
 			$new_setting_fields = array();
596 596
 
597
-			if ( $setting_fields = $this->prev_settings->give_settings( $this->current_tab ) ) {
598
-				if ( isset( $setting_fields['fields'] ) ) {
597
+			if ($setting_fields = $this->prev_settings->give_settings($this->current_tab)) {
598
+				if (isset($setting_fields['fields'])) {
599 599
 
600 600
 					$tab_data = array(
601 601
 						'id'         => $setting_fields['id'],
602 602
 						'give_title' => $setting_fields['give_title'],
603
-						'desc'       => ( isset( $setting_fields['desc'] ) ? $setting_fields['desc'] : '' ),
603
+						'desc'       => (isset($setting_fields['desc']) ? $setting_fields['desc'] : ''),
604 604
 					);
605 605
 
606
-					$new_setting_fields = $this->get_filtered_addon_settings( $setting_fields['fields'], $tab_data );
606
+					$new_setting_fields = $this->get_filtered_addon_settings($setting_fields['fields'], $tab_data);
607 607
 				}
608 608
 			}
609 609
 
@@ -620,24 +620,24 @@  discard block
 block discarded – undo
620 620
 			$sections = $this->get_sections();
621 621
 
622 622
 			// Show section settings only if setting section exist.
623
-			if ( $this->current_section && ! in_array( $this->current_section, array_keys( $sections ) ) ) {
624
-				echo '<div class="error"><p>' . __( 'Oops, this settings page does not exist.', 'give' ) . '</p></div>';
623
+			if ($this->current_section && ! in_array($this->current_section, array_keys($sections))) {
624
+				echo '<div class="error"><p>'.__('Oops, this settings page does not exist.', 'give').'</p></div>';
625 625
 				$GLOBALS['give_hide_save_button'] = true;
626 626
 
627 627
 				return;
628 628
 			}
629 629
 
630 630
 			// Bailout.
631
-			if ( empty( $sections ) ) {
631
+			if (empty($sections)) {
632 632
 				return;
633 633
 			}
634 634
 
635 635
 			echo '<ul class="subsubsub">';
636 636
 
637
-			$array_keys = array_keys( $sections );
637
+			$array_keys = array_keys($sections);
638 638
 
639
-			foreach ( $sections as $id => $label ) {
640
-				echo '<li><a href="' . admin_url( 'edit.php?post_type=give_forms&page=give-settings&tab=' . $this->current_tab . '&section=' . sanitize_title( $id ) ) . '" class="' . ( $this->current_section == $id ? 'current' : '' ) . '">' . strip_tags( $label ) . '</a> ' . ( end( $array_keys ) == $id ? '' : '|' ) . ' </li>';
639
+			foreach ($sections as $id => $label) {
640
+				echo '<li><a href="'.admin_url('edit.php?post_type=give_forms&page=give-settings&tab='.$this->current_tab.'&section='.sanitize_title($id)).'" class="'.($this->current_section == $id ? 'current' : '').'">'.strip_tags($label).'</a> '.(end($array_keys) == $id ? '' : '|').' </li>';
641 641
 			}
642 642
 
643 643
 			echo '</ul><br class="clear" /><hr>';
@@ -652,7 +652,7 @@  discard block
 block discarded – undo
652 652
 		public function output() {
653 653
 			$settings = $this->get_settings();
654 654
 
655
-			Give_Admin_Settings::output_fields( $settings, 'give_settings' );
655
+			Give_Admin_Settings::output_fields($settings, 'give_settings');
656 656
 		}
657 657
 
658 658
 		/**
@@ -664,7 +664,7 @@  discard block
 block discarded – undo
664 664
 		public function save() {
665 665
 			$settings = $this->get_settings();
666 666
 
667
-			Give_Admin_Settings::save_fields( $settings, 'give_settings' );
667
+			Give_Admin_Settings::save_fields($settings, 'give_settings');
668 668
 		}
669 669
 	}
670 670
 endif;
Please login to merge, or discard this patch.
includes/class-give-template-loader.php 1 patch
Spacing   +23 added lines, -23 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
 
@@ -36,29 +36,29 @@  discard block
 block discarded – undo
36 36
 		/**
37 37
 		 * Templates
38 38
 		 */
39
-		add_filter( 'template_include', array( __CLASS__, 'template_loader' ) );
39
+		add_filter('template_include', array(__CLASS__, 'template_loader'));
40 40
 
41 41
 		/**
42 42
 		 * Content Wrappers
43 43
 		 */
44
-		add_action( 'give_before_main_content', 'give_output_content_wrapper', 10 );
45
-		add_action( 'give_after_main_content', 'give_output_content_wrapper_end', 10 );
44
+		add_action('give_before_main_content', 'give_output_content_wrapper', 10);
45
+		add_action('give_after_main_content', 'give_output_content_wrapper_end', 10);
46 46
 
47 47
 		/**
48 48
 		 * Entry Summary Classes
49 49
 		 */
50
-		add_filter( 'give_forms_single_summary_classes', array( $this, 'give_set_single_summary_classes' ) );
50
+		add_filter('give_forms_single_summary_classes', array($this, 'give_set_single_summary_classes'));
51 51
 
52 52
 		/**
53 53
 		 * Sidebar
54 54
 		 */
55
-		add_action( 'give_before_single_form_summary', array( $this, 'give_output_sidebar_option' ), 1 );
55
+		add_action('give_before_single_form_summary', array($this, 'give_output_sidebar_option'), 1);
56 56
 
57 57
 		/**
58 58
 		 * Single Forms Summary Box
59 59
 		 */
60
-		add_action( 'give_single_form_summary', 'give_template_single_title', 5 );
61
-		add_action( 'give_single_form_summary', 'give_get_donation_form', 10 );
60
+		add_action('give_single_form_summary', 'give_template_single_title', 5);
61
+		add_action('give_single_form_summary', 'give_get_donation_form', 10);
62 62
 
63 63
 	}
64 64
 
@@ -73,10 +73,10 @@  discard block
 block discarded – undo
73 73
 	 *
74 74
 	 * @return string $classes List of space separated class names.
75 75
 	 */
76
-	public function give_set_single_summary_classes( $classes ) {
76
+	public function give_set_single_summary_classes($classes) {
77 77
 
78 78
 		//Add full width class when feature image is disabled AND no widgets are present
79
-		if ( ! give_is_setting_enabled( give_get_option( 'form_sidebar' ) ) ) {
79
+		if ( ! give_is_setting_enabled(give_get_option('form_sidebar'))) {
80 80
 			$classes .= ' give-full-width';
81 81
 		}
82 82
 
@@ -97,11 +97,11 @@  discard block
 block discarded – undo
97 97
 	public function give_output_sidebar_option() {
98 98
 
99 99
 		//Add full width class when feature image is disabled AND no widgets are present
100
-		if ( give_is_setting_enabled( give_get_option( 'form_sidebar' ) ) ) {
101
-			add_action( 'give_before_single_form_summary', 'give_left_sidebar_pre_wrap', 5 );
102
-			add_action( 'give_before_single_form_summary', 'give_show_form_images', 10 );
103
-			add_action( 'give_before_single_form_summary', 'give_get_forms_sidebar', 20 );
104
-			add_action( 'give_before_single_form_summary', 'give_left_sidebar_post_wrap', 30 );
100
+		if (give_is_setting_enabled(give_get_option('form_sidebar'))) {
101
+			add_action('give_before_single_form_summary', 'give_left_sidebar_pre_wrap', 5);
102
+			add_action('give_before_single_form_summary', 'give_show_form_images', 10);
103
+			add_action('give_before_single_form_summary', 'give_get_forms_sidebar', 20);
104
+			add_action('give_before_single_form_summary', 'give_left_sidebar_post_wrap', 30);
105 105
 		}
106 106
 
107 107
 	}
@@ -123,20 +123,20 @@  discard block
 block discarded – undo
123 123
 	 *
124 124
 	 * @return string $template
125 125
 	 */
126
-	public static function template_loader( $template ) {
127
-		$find = array( 'give.php' );
126
+	public static function template_loader($template) {
127
+		$find = array('give.php');
128 128
 		$file = '';
129 129
 
130
-		if ( is_single() && get_post_type() == 'give_forms' ) {
130
+		if (is_single() && get_post_type() == 'give_forms') {
131 131
 			$file   = 'single-give-form.php';
132 132
 			$find[] = $file;
133
-			$find[] = apply_filters( 'give_template_path', 'give/' ) . $file;
133
+			$find[] = apply_filters('give_template_path', 'give/').$file;
134 134
 		}
135 135
 
136
-		if ( $file ) {
137
-			$template = locate_template( array_unique( $find ) );
138
-			if ( ! $template ) {
139
-				$template = GIVE_PLUGIN_DIR . '/templates/' . $file;
136
+		if ($file) {
137
+			$template = locate_template(array_unique($find));
138
+			if ( ! $template) {
139
+				$template = GIVE_PLUGIN_DIR.'/templates/'.$file;
140 140
 			}
141 141
 		}
142 142
 
Please login to merge, or discard this patch.
includes/admin/give-metabox-functions.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1283,7 +1283,7 @@
 block discarded – undo
1283 1283
  *
1284 1284
  * @param $field
1285 1285
  *
1286
- * @return string
1286
+ * @return integer
1287 1287
  */
1288 1288
 function _give_set_field_give_id_default_value( $field ) {
1289 1289
 	return 0;
Please login to merge, or discard this patch.
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -555,7 +555,7 @@  discard block
 block discarded – undo
555 555
 				type="radio"
556 556
 				style="' . esc_attr( $field['style'] ) . '"
557 557
 				' . checked( esc_attr( $field['value'] ), esc_attr( $key ), false ) . ' '
558
-		     . give_get_custom_attributes( $field ) . '
558
+			 . give_get_custom_attributes( $field ) . '
559 559
 				/> ' . esc_html( $value ) . '</label>
560 560
 		</li>';
561 561
 	}
@@ -704,9 +704,9 @@  discard block
 block discarded – undo
704 704
 	$field['title'] = isset( $field['title'] ) ? $field['title'] : 'Documentation';
705 705
 
706 706
 	echo '<p class="give-docs-link"><a href="' . esc_url( $field['url'] )
707
-	     . '" target="_blank">'
708
-	     . sprintf( esc_html__( 'Need Help? See docs on "%s"', 'give' ), $field['title'] )
709
-	     . '<span class="dashicons dashicons-editor-help"></span></a></p>';
707
+		 . '" target="_blank">'
708
+		 . sprintf( esc_html__( 'Need Help? See docs on "%s"', 'give' ), $field['title'] )
709
+		 . '<span class="dashicons dashicons-editor-help"></span></a></p>';
710 710
 }
711 711
 
712 712
 /**
Please login to merge, or discard this patch.
Spacing   +312 added lines, -312 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
8 8
  * @license     http://opensource.org/licenses/gpl-2.0.php GNU Public License
9 9
  * @since       1.8
10 10
  */
11
-if ( ! defined( 'ABSPATH' ) ) {
11
+if ( ! defined('ABSPATH')) {
12 12
 	exit; // Exit if accessed directly
13 13
 }
14 14
 
@@ -22,8 +22,8 @@  discard block
 block discarded – undo
22 22
  *
23 23
  * @return bool|string
24 24
  */
25
-function give_is_field_callback_exist( $field ) {
26
-	return ( give_get_field_callback( $field ) ? true : false );
25
+function give_is_field_callback_exist($field) {
26
+	return (give_get_field_callback($field) ? true : false);
27 27
 }
28 28
 
29 29
 /**
@@ -35,12 +35,12 @@  discard block
 block discarded – undo
35 35
  *
36 36
  * @return bool|string
37 37
  */
38
-function give_get_field_callback( $field ) {
38
+function give_get_field_callback($field) {
39 39
 	$func_name_prefix = 'give';
40 40
 	$func_name        = '';
41 41
 
42 42
 	// Set callback function on basis of cmb2 field name.
43
-	switch ( $field['type'] ) {
43
+	switch ($field['type']) {
44 44
 		case 'radio_inline':
45 45
 			$func_name = "{$func_name_prefix}_radio";
46 46
 			break;
@@ -76,8 +76,8 @@  discard block
 block discarded – undo
76 76
 		default:
77 77
 
78 78
 			if (
79
-				array_key_exists( 'callback', $field )
80
-				&& ! empty( $field['callback'] )
79
+				array_key_exists('callback', $field)
80
+				&& ! empty($field['callback'])
81 81
 			) {
82 82
 				$func_name = $field['callback'];
83 83
 			} else {
@@ -90,15 +90,15 @@  discard block
 block discarded – undo
90 90
 	 *
91 91
 	 * @since 1.8
92 92
 	 */
93
-	$func_name = apply_filters( 'give_get_field_callback', $func_name, $field );
93
+	$func_name = apply_filters('give_get_field_callback', $func_name, $field);
94 94
 
95 95
 	// Exit if not any function exist.
96 96
 	// Check if render callback exist or not.
97
-	if ( empty( $func_name ) ) {
97
+	if (empty($func_name)) {
98 98
 		return false;
99
-	} elseif ( is_string( $func_name ) && ! function_exists( "$func_name" ) ) {
99
+	} elseif (is_string($func_name) && ! function_exists("$func_name")) {
100 100
 		return false;
101
-	} elseif ( is_array( $func_name ) && ! method_exists( $func_name[0], "$func_name[1]" ) ) {
101
+	} elseif (is_array($func_name) && ! method_exists($func_name[0], "$func_name[1]")) {
102 102
 		return false;
103 103
 	}
104 104
 
@@ -114,35 +114,35 @@  discard block
 block discarded – undo
114 114
  *
115 115
  * @return bool
116 116
  */
117
-function give_render_field( $field ) {
117
+function give_render_field($field) {
118 118
 
119 119
 	// Check if render callback exist or not.
120
-	if ( ! ( $func_name = give_get_field_callback( $field ) ) ) {
120
+	if ( ! ($func_name = give_get_field_callback($field))) {
121 121
 		return false;
122 122
 	}
123 123
 
124 124
 	// CMB2 compatibility: Push all classes to attributes's class key
125
-	if ( empty( $field['class'] ) ) {
125
+	if (empty($field['class'])) {
126 126
 		$field['class'] = '';
127 127
 	}
128 128
 
129
-	if ( empty( $field['attributes']['class'] ) ) {
129
+	if (empty($field['attributes']['class'])) {
130 130
 		$field['attributes']['class'] = '';
131 131
 	}
132 132
 
133
-	$field['attributes']['class'] = trim( "give-field {$field['attributes']['class']} give-{$field['type']} {$field['class']}" );
134
-	unset( $field['class'] );
133
+	$field['attributes']['class'] = trim("give-field {$field['attributes']['class']} give-{$field['type']} {$field['class']}");
134
+	unset($field['class']);
135 135
 
136 136
 	// CMB2 compatibility: Set wrapper class if any.
137
-	if ( ! empty( $field['row_classes'] ) ) {
137
+	if ( ! empty($field['row_classes'])) {
138 138
 		$field['wrapper_class'] = $field['row_classes'];
139
-		unset( $field['row_classes'] );
139
+		unset($field['row_classes']);
140 140
 	}
141 141
 
142 142
 	// Set field params on basis of cmb2 field name.
143
-	switch ( $field['type'] ) {
143
+	switch ($field['type']) {
144 144
 		case 'radio_inline':
145
-			if ( empty( $field['wrapper_class'] ) ) {
145
+			if (empty($field['wrapper_class'])) {
146 146
 				$field['wrapper_class'] = '';
147 147
 			}
148 148
 			$field['wrapper_class'] .= ' give-inline-radio-fields';
@@ -155,15 +155,15 @@  discard block
 block discarded – undo
155 155
 		case 'text-small' :
156 156
 		case 'text_small' :
157 157
 			// CMB2 compatibility: Set field type to text.
158
-			$field['type'] = isset( $field['attributes']['type'] ) ? $field['attributes']['type'] : 'text';
158
+			$field['type'] = isset($field['attributes']['type']) ? $field['attributes']['type'] : 'text';
159 159
 
160 160
 			// CMB2 compatibility: Set data type to price.
161 161
 			if (
162
-				empty( $field['data_type'] )
163
-				&& ! empty( $field['attributes']['class'] )
162
+				empty($field['data_type'])
163
+				&& ! empty($field['attributes']['class'])
164 164
 				&& (
165
-					false !== strpos( $field['attributes']['class'], 'money' )
166
-					|| false !== strpos( $field['attributes']['class'], 'amount' )
165
+					false !== strpos($field['attributes']['class'], 'money')
166
+					|| false !== strpos($field['attributes']['class'], 'amount')
167 167
 				)
168 168
 			) {
169 169
 				$field['data_type'] = 'decimal';
@@ -182,22 +182,22 @@  discard block
 block discarded – undo
182 182
 		case 'give_default_radio_inline':
183 183
 			$field['type']    = 'radio';
184 184
 			$field['options'] = array(
185
-				'default' => __( 'Default' ),
185
+				'default' => __('Default'),
186 186
 			);
187 187
 			break;
188 188
 	}
189 189
 
190 190
 	// CMB2 compatibility: Add support to define field description by desc & description param.
191 191
 	// We encourage you to use description param.
192
-	$field['description'] = ( ! empty( $field['description'] )
192
+	$field['description'] = ( ! empty($field['description'])
193 193
 		? $field['description']
194
-		: ( ! empty( $field['desc'] ) ? $field['desc'] : '' ) );
194
+		: ( ! empty($field['desc']) ? $field['desc'] : ''));
195 195
 
196 196
 	// Call render function.
197
-	if ( is_array( $func_name ) ) {
198
-		$func_name[0]->{$func_name[1]}( $field );
197
+	if (is_array($func_name)) {
198
+		$func_name[0]->{$func_name[1]}($field);
199 199
 	} else {
200
-		$func_name( $field );
200
+		$func_name($field);
201 201
 	}
202 202
 
203 203
 	return true;
@@ -227,29 +227,29 @@  discard block
 block discarded – undo
227 227
  * }
228 228
  * @return void
229 229
  */
230
-function give_text_input( $field ) {
230
+function give_text_input($field) {
231 231
 	global $thepostid, $post;
232 232
 
233
-	$thepostid              = empty( $thepostid ) ? $post->ID : $thepostid;
234
-	$field['style']         = isset( $field['style'] ) ? $field['style'] : '';
235
-	$field['wrapper_class'] = isset( $field['wrapper_class'] ) ? $field['wrapper_class'] : '';
236
-	$field['value']         = give_get_field_value( $field, $thepostid );
237
-	$field['type']          = isset( $field['type'] ) ? $field['type'] : 'text';
233
+	$thepostid              = empty($thepostid) ? $post->ID : $thepostid;
234
+	$field['style']         = isset($field['style']) ? $field['style'] : '';
235
+	$field['wrapper_class'] = isset($field['wrapper_class']) ? $field['wrapper_class'] : '';
236
+	$field['value']         = give_get_field_value($field, $thepostid);
237
+	$field['type']          = isset($field['type']) ? $field['type'] : 'text';
238 238
 	$field['before_field']  = '';
239 239
 	$field['after_field']   = '';
240
-	$data_type              = empty( $field['data_type'] ) ? '' : $field['data_type'];
240
+	$data_type              = empty($field['data_type']) ? '' : $field['data_type'];
241 241
 
242
-	switch ( $data_type ) {
242
+	switch ($data_type) {
243 243
 		case 'price' :
244
-			$field['value'] = ( ! empty( $field['value'] ) ? give_format_amount( give_maybe_sanitize_amount( $field['value'] ), array( 'sanitize' => false ) ) : $field['value'] );
244
+			$field['value'] = ( ! empty($field['value']) ? give_format_amount(give_maybe_sanitize_amount($field['value']), array('sanitize' => false)) : $field['value']);
245 245
 
246
-			$field['before_field'] = ! empty( $field['before_field'] ) ? $field['before_field'] : ( give_get_option( 'currency_position', 'before' ) == 'before' ? '<span class="give-money-symbol give-money-symbol-before">' . give_currency_symbol() . '</span>' : '' );
247
-			$field['after_field']  = ! empty( $field['after_field'] ) ? $field['after_field'] : ( give_get_option( 'currency_position', 'before' ) == 'after' ? '<span class="give-money-symbol give-money-symbol-after">' . give_currency_symbol() . '</span>' : '' );
246
+			$field['before_field'] = ! empty($field['before_field']) ? $field['before_field'] : (give_get_option('currency_position', 'before') == 'before' ? '<span class="give-money-symbol give-money-symbol-before">'.give_currency_symbol().'</span>' : '');
247
+			$field['after_field']  = ! empty($field['after_field']) ? $field['after_field'] : (give_get_option('currency_position', 'before') == 'after' ? '<span class="give-money-symbol give-money-symbol-after">'.give_currency_symbol().'</span>' : '');
248 248
 			break;
249 249
 
250 250
 		case 'decimal' :
251 251
 			$field['attributes']['class'] .= ' give_input_decimal';
252
-			$field['value'] = ( ! empty( $field['value'] ) ? give_format_decimal( give_maybe_sanitize_amount( $field['value'] ), false, false ) : $field['value'] );
252
+			$field['value'] = ( ! empty($field['value']) ? give_format_decimal(give_maybe_sanitize_amount($field['value']), false, false) : $field['value']);
253 253
 			break;
254 254
 
255 255
 		default :
@@ -257,20 +257,20 @@  discard block
 block discarded – undo
257 257
 	}
258 258
 
259 259
 	?>
260
-	<p class="give-field-wrap <?php echo esc_attr( $field['id'] ); ?>_field <?php echo esc_attr( $field['wrapper_class'] ); ?>">
261
-	<label for="<?php echo give_get_field_name( $field ); ?>"><?php echo wp_kses_post( $field['name'] ); ?></label>
260
+	<p class="give-field-wrap <?php echo esc_attr($field['id']); ?>_field <?php echo esc_attr($field['wrapper_class']); ?>">
261
+	<label for="<?php echo give_get_field_name($field); ?>"><?php echo wp_kses_post($field['name']); ?></label>
262 262
 	<?php echo $field['before_field']; ?>
263 263
 	<input
264
-			type="<?php echo esc_attr( $field['type'] ); ?>"
265
-			style="<?php echo esc_attr( $field['style'] ); ?>"
266
-			name="<?php echo give_get_field_name( $field ); ?>"
267
-			id="<?php echo esc_attr( $field['id'] ); ?>"
268
-			value="<?php echo esc_attr( $field['value'] ); ?>"
269
-		<?php echo give_get_custom_attributes( $field ); ?>
264
+			type="<?php echo esc_attr($field['type']); ?>"
265
+			style="<?php echo esc_attr($field['style']); ?>"
266
+			name="<?php echo give_get_field_name($field); ?>"
267
+			id="<?php echo esc_attr($field['id']); ?>"
268
+			value="<?php echo esc_attr($field['value']); ?>"
269
+		<?php echo give_get_custom_attributes($field); ?>
270 270
 	/>
271 271
 	<?php echo $field['after_field']; ?>
272 272
 	<?php
273
-	echo give_get_field_description( $field );
273
+	echo give_get_field_description($field);
274 274
 	echo '</p>';
275 275
 }
276 276
 
@@ -292,29 +292,29 @@  discard block
 block discarded – undo
292 292
  * }
293 293
  * @return void
294 294
  */
295
-function give_hidden_input( $field ) {
295
+function give_hidden_input($field) {
296 296
 	global $thepostid, $post;
297 297
 
298
-	$thepostid      = empty( $thepostid ) ? $post->ID : $thepostid;
299
-	$field['value'] = give_get_field_value( $field, $thepostid );
298
+	$thepostid      = empty($thepostid) ? $post->ID : $thepostid;
299
+	$field['value'] = give_get_field_value($field, $thepostid);
300 300
 
301 301
 	// Custom attribute handling
302 302
 	$custom_attributes = array();
303 303
 
304
-	if ( ! empty( $field['attributes'] ) && is_array( $field['attributes'] ) ) {
304
+	if ( ! empty($field['attributes']) && is_array($field['attributes'])) {
305 305
 
306
-		foreach ( $field['attributes'] as $attribute => $value ) {
307
-			$custom_attributes[] = esc_attr( $attribute ) . '="' . esc_attr( $value ) . '"';
306
+		foreach ($field['attributes'] as $attribute => $value) {
307
+			$custom_attributes[] = esc_attr($attribute).'="'.esc_attr($value).'"';
308 308
 		}
309 309
 	}
310 310
 	?>
311 311
 
312 312
 	<input
313 313
 			type="hidden"
314
-			name="<?php echo give_get_field_name( $field ); ?>"
315
-			id="<?php echo esc_attr( $field['id'] ); ?>"
316
-			value="<?php echo esc_attr( $field['value'] ); ?>"
317
-		<?php echo give_get_custom_attributes( $field ); ?>
314
+			name="<?php echo give_get_field_name($field); ?>"
315
+			id="<?php echo esc_attr($field['id']); ?>"
316
+			value="<?php echo esc_attr($field['value']); ?>"
317
+		<?php echo give_get_custom_attributes($field); ?>
318 318
 	/>
319 319
 	<?php
320 320
 }
@@ -340,27 +340,27 @@  discard block
 block discarded – undo
340 340
  * }
341 341
  * @return void
342 342
  */
343
-function give_textarea_input( $field ) {
343
+function give_textarea_input($field) {
344 344
 	global $thepostid, $post;
345 345
 
346
-	$thepostid              = empty( $thepostid ) ? $post->ID : $thepostid;
347
-	$field['style']         = isset( $field['style'] ) ? $field['style'] : '';
348
-	$field['wrapper_class'] = isset( $field['wrapper_class'] ) ? $field['wrapper_class'] : '';
349
-	$field['value']         = give_get_field_value( $field, $thepostid );
346
+	$thepostid              = empty($thepostid) ? $post->ID : $thepostid;
347
+	$field['style']         = isset($field['style']) ? $field['style'] : '';
348
+	$field['wrapper_class'] = isset($field['wrapper_class']) ? $field['wrapper_class'] : '';
349
+	$field['value']         = give_get_field_value($field, $thepostid);
350 350
 
351 351
 	?>
352
-	<p class="give-field-wrap <?php echo esc_attr( $field['id'] ); ?>_field <?php echo esc_attr( $field['wrapper_class'] ); ?>">
353
-	<label for="<?php echo give_get_field_name( $field ); ?>"><?php echo wp_kses_post( $field['name'] ); ?></label>
352
+	<p class="give-field-wrap <?php echo esc_attr($field['id']); ?>_field <?php echo esc_attr($field['wrapper_class']); ?>">
353
+	<label for="<?php echo give_get_field_name($field); ?>"><?php echo wp_kses_post($field['name']); ?></label>
354 354
 	<textarea
355
-			style="<?php echo esc_attr( $field['style'] ); ?>"
356
-			name="<?php echo give_get_field_name( $field ); ?>"
357
-			id="<?php echo esc_attr( $field['id'] ); ?>"
355
+			style="<?php echo esc_attr($field['style']); ?>"
356
+			name="<?php echo give_get_field_name($field); ?>"
357
+			id="<?php echo esc_attr($field['id']); ?>"
358 358
 			rows="10"
359 359
 			cols="20"
360
-		<?php echo give_get_custom_attributes( $field ); ?>
361
-	><?php echo esc_textarea( $field['value'] ); ?></textarea>
360
+		<?php echo give_get_custom_attributes($field); ?>
361
+	><?php echo esc_textarea($field['value']); ?></textarea>
362 362
 	<?php
363
-	echo give_get_field_description( $field );
363
+	echo give_get_field_description($field);
364 364
 	echo '</p>';
365 365
 }
366 366
 
@@ -384,29 +384,29 @@  discard block
 block discarded – undo
384 384
  * }
385 385
  * @return void
386 386
  */
387
-function give_wysiwyg( $field ) {
387
+function give_wysiwyg($field) {
388 388
 	global $thepostid, $post;
389 389
 
390
-	$thepostid              = empty( $thepostid ) ? $post->ID : $thepostid;
391
-	$field['value']         = give_get_field_value( $field, $thepostid );
392
-	$field['style']         = isset( $field['style'] ) ? $field['style'] : '';
393
-	$field['wrapper_class'] = isset( $field['wrapper_class'] ) ? $field['wrapper_class'] : '';
390
+	$thepostid              = empty($thepostid) ? $post->ID : $thepostid;
391
+	$field['value']         = give_get_field_value($field, $thepostid);
392
+	$field['style']         = isset($field['style']) ? $field['style'] : '';
393
+	$field['wrapper_class'] = isset($field['wrapper_class']) ? $field['wrapper_class'] : '';
394 394
 
395
-	$field['unique_field_id'] = give_get_field_name( $field );
395
+	$field['unique_field_id'] = give_get_field_name($field);
396 396
 	$editor_attributes        = array(
397
-		'textarea_name' => isset( $field['repeatable_field_id'] ) ? $field['repeatable_field_id'] : $field['id'],
397
+		'textarea_name' => isset($field['repeatable_field_id']) ? $field['repeatable_field_id'] : $field['id'],
398 398
 		'textarea_rows' => '10',
399
-		'editor_css'    => esc_attr( $field['style'] ),
399
+		'editor_css'    => esc_attr($field['style']),
400 400
 		'editor_class'  => $field['attributes']['class'],
401 401
 	);
402
-	$data_wp_editor           = ' data-wp-editor="' . base64_encode( json_encode( array(
402
+	$data_wp_editor = ' data-wp-editor="'.base64_encode(json_encode(array(
403 403
 			$field['value'],
404 404
 			$field['unique_field_id'],
405 405
 			$editor_attributes,
406
-	) ) ) . '"';
407
-	$data_wp_editor           = isset( $field['repeatable_field_id'] ) ? $data_wp_editor : '';
406
+	))).'"';
407
+	$data_wp_editor = isset($field['repeatable_field_id']) ? $data_wp_editor : '';
408 408
 
409
-	echo '<div class="give-field-wrap ' . $field['unique_field_id'] . '_field ' . esc_attr( $field['wrapper_class'] ) . '"' . $data_wp_editor . '><label for="' . $field['unique_field_id'] . '">' . wp_kses_post( $field['name'] ) . '</label>';
409
+	echo '<div class="give-field-wrap '.$field['unique_field_id'].'_field '.esc_attr($field['wrapper_class']).'"'.$data_wp_editor.'><label for="'.$field['unique_field_id'].'">'.wp_kses_post($field['name']).'</label>';
410 410
 
411 411
 	wp_editor(
412 412
 		$field['value'],
@@ -414,7 +414,7 @@  discard block
 block discarded – undo
414 414
 		$editor_attributes
415 415
 	);
416 416
 
417
-	echo give_get_field_description( $field );
417
+	echo give_get_field_description($field);
418 418
 	echo '</div>';
419 419
 }
420 420
 
@@ -439,29 +439,29 @@  discard block
 block discarded – undo
439 439
  * }
440 440
  * @return void
441 441
  */
442
-function give_checkbox( $field ) {
442
+function give_checkbox($field) {
443 443
 	global $thepostid, $post;
444 444
 
445
-	$thepostid              = empty( $thepostid ) ? $post->ID : $thepostid;
446
-	$field['style']         = isset( $field['style'] ) ? $field['style'] : '';
447
-	$field['wrapper_class'] = isset( $field['wrapper_class'] ) ? $field['wrapper_class'] : '';
448
-	$field['value']         = give_get_field_value( $field, $thepostid );
449
-	$field['cbvalue']       = isset( $field['cbvalue'] ) ? $field['cbvalue'] : 'on';
450
-	$field['name']          = isset( $field['name'] ) ? $field['name'] : $field['id'];
445
+	$thepostid              = empty($thepostid) ? $post->ID : $thepostid;
446
+	$field['style']         = isset($field['style']) ? $field['style'] : '';
447
+	$field['wrapper_class'] = isset($field['wrapper_class']) ? $field['wrapper_class'] : '';
448
+	$field['value']         = give_get_field_value($field, $thepostid);
449
+	$field['cbvalue']       = isset($field['cbvalue']) ? $field['cbvalue'] : 'on';
450
+	$field['name']          = isset($field['name']) ? $field['name'] : $field['id'];
451 451
 	?>
452
-	<p class="give-field-wrap <?php echo esc_attr( $field['id'] ); ?>_field <?php echo esc_attr( $field['wrapper_class'] ); ?>">
453
-	<label for="<?php echo give_get_field_name( $field ); ?>"><?php echo wp_kses_post( $field['name'] ); ?></label>
452
+	<p class="give-field-wrap <?php echo esc_attr($field['id']); ?>_field <?php echo esc_attr($field['wrapper_class']); ?>">
453
+	<label for="<?php echo give_get_field_name($field); ?>"><?php echo wp_kses_post($field['name']); ?></label>
454 454
 	<input
455 455
 			type="checkbox"
456
-			style="<?php echo esc_attr( $field['style'] ); ?>"
457
-			name="<?php echo give_get_field_name( $field ); ?>"
458
-			id="<?php echo esc_attr( $field['id'] ); ?>"
459
-			value="<?php echo esc_attr( $field['cbvalue'] ); ?>"
460
-		<?php echo checked( $field['value'], $field['cbvalue'], false ); ?>
461
-		<?php echo give_get_custom_attributes( $field ); ?>
456
+			style="<?php echo esc_attr($field['style']); ?>"
457
+			name="<?php echo give_get_field_name($field); ?>"
458
+			id="<?php echo esc_attr($field['id']); ?>"
459
+			value="<?php echo esc_attr($field['cbvalue']); ?>"
460
+		<?php echo checked($field['value'], $field['cbvalue'], false); ?>
461
+		<?php echo give_get_custom_attributes($field); ?>
462 462
 	/>
463 463
 	<?php
464
-	echo give_get_field_description( $field );
464
+	echo give_get_field_description($field);
465 465
 	echo '</p>';
466 466
 }
467 467
 
@@ -487,29 +487,29 @@  discard block
 block discarded – undo
487 487
  * }
488 488
  * @return void
489 489
  */
490
-function give_select( $field ) {
490
+function give_select($field) {
491 491
 	global $thepostid, $post;
492 492
 
493
-	$thepostid              = empty( $thepostid ) ? $post->ID : $thepostid;
494
-	$field['style']         = isset( $field['style'] ) ? $field['style'] : '';
495
-	$field['wrapper_class'] = isset( $field['wrapper_class'] ) ? $field['wrapper_class'] : '';
496
-	$field['value']         = give_get_field_value( $field, $thepostid );
497
-	$field['name']          = isset( $field['name'] ) ? $field['name'] : $field['id'];
493
+	$thepostid              = empty($thepostid) ? $post->ID : $thepostid;
494
+	$field['style']         = isset($field['style']) ? $field['style'] : '';
495
+	$field['wrapper_class'] = isset($field['wrapper_class']) ? $field['wrapper_class'] : '';
496
+	$field['value']         = give_get_field_value($field, $thepostid);
497
+	$field['name']          = isset($field['name']) ? $field['name'] : $field['id'];
498 498
 	?>
499
-	<p class="give-field-wrap <?php echo esc_attr( $field['id'] ); ?>_field <?php echo esc_attr( $field['wrapper_class'] ); ?>">
500
-	<label for="<?php echo give_get_field_name( $field ); ?>"><?php echo wp_kses_post( $field['name'] ); ?></label>
499
+	<p class="give-field-wrap <?php echo esc_attr($field['id']); ?>_field <?php echo esc_attr($field['wrapper_class']); ?>">
500
+	<label for="<?php echo give_get_field_name($field); ?>"><?php echo wp_kses_post($field['name']); ?></label>
501 501
 	<select
502
-	id="<?php echo esc_attr( $field['id'] ); ?>"
503
-	name="<?php echo give_get_field_name( $field ); ?>"
504
-	style="<?php echo esc_attr( $field['style'] ) ?>"
505
-	<?php echo give_get_custom_attributes( $field ); ?>
502
+	id="<?php echo esc_attr($field['id']); ?>"
503
+	name="<?php echo give_get_field_name($field); ?>"
504
+	style="<?php echo esc_attr($field['style']) ?>"
505
+	<?php echo give_get_custom_attributes($field); ?>
506 506
 	>
507 507
 	<?php
508
-	foreach ( $field['options'] as $key => $value ) {
509
-		echo '<option value="' . esc_attr( $key ) . '" ' . selected( esc_attr( $field['value'] ), esc_attr( $key ), false ) . '>' . esc_html( $value ) . '</option>';
508
+	foreach ($field['options'] as $key => $value) {
509
+		echo '<option value="'.esc_attr($key).'" '.selected(esc_attr($field['value']), esc_attr($key), false).'>'.esc_html($value).'</option>';
510 510
 	}
511 511
 	echo '</select>';
512
-	echo give_get_field_description( $field );
512
+	echo give_get_field_description($field);
513 513
 	echo '</p>';
514 514
 }
515 515
 
@@ -536,32 +536,32 @@  discard block
 block discarded – undo
536 536
  * }
537 537
  * @return void
538 538
  */
539
-function give_radio( $field ) {
539
+function give_radio($field) {
540 540
 	global $thepostid, $post;
541 541
 
542
-	$thepostid              = empty( $thepostid ) ? $post->ID : $thepostid;
543
-	$field['style']         = isset( $field['style'] ) ? $field['style'] : '';
544
-	$field['wrapper_class'] = isset( $field['wrapper_class'] ) ? $field['wrapper_class'] : '';
545
-	$field['value']         = give_get_field_value( $field, $thepostid );
546
-	$field['name']          = isset( $field['name'] ) ? $field['name'] : $field['id'];
542
+	$thepostid              = empty($thepostid) ? $post->ID : $thepostid;
543
+	$field['style']         = isset($field['style']) ? $field['style'] : '';
544
+	$field['wrapper_class'] = isset($field['wrapper_class']) ? $field['wrapper_class'] : '';
545
+	$field['value']         = give_get_field_value($field, $thepostid);
546
+	$field['name']          = isset($field['name']) ? $field['name'] : $field['id'];
547 547
 
548
-	echo '<fieldset class="give-field-wrap ' . esc_attr( $field['id'] ) . '_field ' . esc_attr( $field['wrapper_class'] ) . '"><span class="give-field-label">' . wp_kses_post( $field['name'] ) . '</span><legend class="screen-reader-text">' . wp_kses_post( $field['name'] ) . '</legend><ul class="give-radios">';
548
+	echo '<fieldset class="give-field-wrap '.esc_attr($field['id']).'_field '.esc_attr($field['wrapper_class']).'"><span class="give-field-label">'.wp_kses_post($field['name']).'</span><legend class="screen-reader-text">'.wp_kses_post($field['name']).'</legend><ul class="give-radios">';
549 549
 
550
-	foreach ( $field['options'] as $key => $value ) {
550
+	foreach ($field['options'] as $key => $value) {
551 551
 
552 552
 		echo '<li><label><input
553
-				name="' . give_get_field_name( $field ) . '"
554
-				value="' . esc_attr( $key ) . '"
553
+				name="' . give_get_field_name($field).'"
554
+				value="' . esc_attr($key).'"
555 555
 				type="radio"
556
-				style="' . esc_attr( $field['style'] ) . '"
557
-				' . checked( esc_attr( $field['value'] ), esc_attr( $key ), false ) . ' '
558
-		     . give_get_custom_attributes( $field ) . '
559
-				/> ' . esc_html( $value ) . '</label>
556
+				style="' . esc_attr($field['style']).'"
557
+				' . checked(esc_attr($field['value']), esc_attr($key), false).' '
558
+		     . give_get_custom_attributes($field).'
559
+				/> ' . esc_html($value).'</label>
560 560
 		</li>';
561 561
 	}
562 562
 	echo '</ul>';
563 563
 
564
-	echo give_get_field_description( $field );
564
+	echo give_get_field_description($field);
565 565
 	echo '</fieldset>';
566 566
 }
567 567
 
@@ -585,27 +585,27 @@  discard block
 block discarded – undo
585 585
  * }
586 586
  * @return void
587 587
  */
588
-function give_colorpicker( $field ) {
588
+function give_colorpicker($field) {
589 589
 	global $thepostid, $post;
590 590
 
591
-	$thepostid              = empty( $thepostid ) ? $post->ID : $thepostid;
592
-	$field['style']         = isset( $field['style'] ) ? $field['style'] : '';
593
-	$field['wrapper_class'] = isset( $field['wrapper_class'] ) ? $field['wrapper_class'] : '';
594
-	$field['value']         = give_get_field_value( $field, $thepostid );
595
-	$field['name']          = isset( $field['name'] ) ? $field['name'] : $field['id'];
591
+	$thepostid              = empty($thepostid) ? $post->ID : $thepostid;
592
+	$field['style']         = isset($field['style']) ? $field['style'] : '';
593
+	$field['wrapper_class'] = isset($field['wrapper_class']) ? $field['wrapper_class'] : '';
594
+	$field['value']         = give_get_field_value($field, $thepostid);
595
+	$field['name']          = isset($field['name']) ? $field['name'] : $field['id'];
596 596
 	$field['type']          = 'text';
597 597
 	?>
598
-	<p class="give-field-wrap <?php echo esc_attr( $field['id'] ); ?>_field <?php echo esc_attr( $field['wrapper_class'] ); ?>">
599
-	<label for="<?php echo give_get_field_name( $field ); ?>"><?php echo wp_kses_post( $field['name'] ); ?></label>
598
+	<p class="give-field-wrap <?php echo esc_attr($field['id']); ?>_field <?php echo esc_attr($field['wrapper_class']); ?>">
599
+	<label for="<?php echo give_get_field_name($field); ?>"><?php echo wp_kses_post($field['name']); ?></label>
600 600
 	<input
601
-			type="<?php echo esc_attr( $field['type'] ); ?>"
602
-			style="<?php echo esc_attr( $field['style'] ); ?>"
603
-			name="<?php echo give_get_field_name( $field ); ?>"
604
-			id="' . esc_attr( $field['id'] ) . '" value="<?php echo esc_attr( $field['value'] ); ?>"
605
-		<?php echo give_get_custom_attributes( $field ); ?>
601
+			type="<?php echo esc_attr($field['type']); ?>"
602
+			style="<?php echo esc_attr($field['style']); ?>"
603
+			name="<?php echo give_get_field_name($field); ?>"
604
+			id="' . esc_attr( $field['id'] ) . '" value="<?php echo esc_attr($field['value']); ?>"
605
+		<?php echo give_get_custom_attributes($field); ?>
606 606
 	/>
607 607
 	<?php
608
-	echo give_get_field_description( $field );
608
+	echo give_get_field_description($field);
609 609
 	echo '</p>';
610 610
 }
611 611
 
@@ -616,8 +616,8 @@  discard block
 block discarded – undo
616 616
  *
617 617
  * @param array $field
618 618
  */
619
-function give_file( $field ) {
620
-	give_media( $field );
619
+function give_file($field) {
620
+	give_media($field);
621 621
 }
622 622
 
623 623
 
@@ -628,40 +628,40 @@  discard block
 block discarded – undo
628 628
  *
629 629
  * @param array $field
630 630
  */
631
-function give_media( $field ) {
631
+function give_media($field) {
632 632
 	global $thepostid, $post;
633 633
 
634
-	$thepostid    = empty( $thepostid ) ? $post->ID : $thepostid;
635
-	$button_label = esc_html__( sprintf( 'Add or Upload %s', ( 'file' === $field['type'] ? 'File' : 'Image' ) ), 'give' );
634
+	$thepostid    = empty($thepostid) ? $post->ID : $thepostid;
635
+	$button_label = esc_html__(sprintf('Add or Upload %s', ('file' === $field['type'] ? 'File' : 'Image')), 'give');
636 636
 
637
-	$field['style']               = isset( $field['style'] ) ? $field['style'] : '';
638
-	$field['wrapper_class']       = isset( $field['wrapper_class'] ) ? $field['wrapper_class'] : '';
639
-	$field['value']               = give_get_field_value( $field, $thepostid );
640
-	$field['name']                = isset( $field['name'] ) ? $field['name'] : $field['id'];
637
+	$field['style']               = isset($field['style']) ? $field['style'] : '';
638
+	$field['wrapper_class']       = isset($field['wrapper_class']) ? $field['wrapper_class'] : '';
639
+	$field['value']               = give_get_field_value($field, $thepostid);
640
+	$field['name']                = isset($field['name']) ? $field['name'] : $field['id'];
641 641
 	$field['attributes']['class'] = "{$field['attributes']['class']} give-text-medium";
642 642
 
643 643
 	// Allow developer to save attachment ID or attachment url as metadata.
644
-	$field['fvalue'] = isset( $field['fvalue'] ) ? $field['fvalue'] : 'url';
644
+	$field['fvalue'] = isset($field['fvalue']) ? $field['fvalue'] : 'url';
645 645
 
646
-	$allow_media_preview_tags = array( 'jpg', 'jpeg', 'png', 'gif', 'ico' );
647
-	$preview_image_src        = $field['value'] ? ( 'id' === $field['fvalue'] ? wp_get_attachment_url( $field['value'] ) : $field['value'] ) : '#';
648
-	$preview_image_extension  = $preview_image_src ? pathinfo( $preview_image_src, PATHINFO_EXTENSION ) : '';
649
-	$is_show_preview = in_array( $preview_image_extension, $allow_media_preview_tags );
646
+	$allow_media_preview_tags = array('jpg', 'jpeg', 'png', 'gif', 'ico');
647
+	$preview_image_src        = $field['value'] ? ('id' === $field['fvalue'] ? wp_get_attachment_url($field['value']) : $field['value']) : '#';
648
+	$preview_image_extension  = $preview_image_src ? pathinfo($preview_image_src, PATHINFO_EXTENSION) : '';
649
+	$is_show_preview = in_array($preview_image_extension, $allow_media_preview_tags);
650 650
 	?>
651
-	<fieldset class="give-field-wrap <?php echo esc_attr( $field['id'] ); ?>_field <?php echo esc_attr( $field['wrapper_class'] ); ?>">
652
-		<label for="<?php echo give_get_field_name( $field ) ?>"><?php echo wp_kses_post( $field['name'] ); ?></label>
651
+	<fieldset class="give-field-wrap <?php echo esc_attr($field['id']); ?>_field <?php echo esc_attr($field['wrapper_class']); ?>">
652
+		<label for="<?php echo give_get_field_name($field) ?>"><?php echo wp_kses_post($field['name']); ?></label>
653 653
 		<input
654
-				name="<?php echo give_get_field_name( $field ); ?>"
655
-				id="<?php echo esc_attr( $field['id'] ); ?>"
654
+				name="<?php echo give_get_field_name($field); ?>"
655
+				id="<?php echo esc_attr($field['id']); ?>"
656 656
 				type="text"
657 657
 				value="<?php echo $field['value']; ?>"
658
-				style="<?php echo esc_attr( $field['style'] ); ?>"
659
-			<?php echo give_get_custom_attributes( $field ); ?>
658
+				style="<?php echo esc_attr($field['style']); ?>"
659
+			<?php echo give_get_custom_attributes($field); ?>
660 660
 		/>&nbsp;&nbsp;&nbsp;&nbsp;<input class="give-upload-button button" type="button" value="<?php echo $button_label; ?>" data-fvalue="<?php echo $field['fvalue']; ?>" data-field-type="<?php echo $field['type']; ?>">
661
-		<?php echo give_get_field_description( $field ); ?>
661
+		<?php echo give_get_field_description($field); ?>
662 662
 		<div class="give-image-thumb<?php echo ! $field['value'] || ! $is_show_preview ? ' give-hidden' : ''; ?>">
663 663
 			<span class="give-delete-image-thumb dashicons dashicons-no-alt"></span>
664
-			<img src="<?php echo $preview_image_src ; ?>" alt="">
664
+			<img src="<?php echo $preview_image_src; ?>" alt="">
665 665
 		</div>
666 666
 	</fieldset>
667 667
 	<?php
@@ -676,27 +676,27 @@  discard block
 block discarded – undo
676 676
  *
677 677
  * @return void
678 678
  */
679
-function give_default_gateway( $field ) {
679
+function give_default_gateway($field) {
680 680
 	global $thepostid, $post;
681 681
 
682 682
 	// get all active payment gateways.
683
-	$gateways         = give_get_enabled_payment_gateways( $thepostid );
683
+	$gateways         = give_get_enabled_payment_gateways($thepostid);
684 684
 	$field['options'] = array();
685 685
 
686 686
 	// Set field option value.
687
-	if ( ! empty( $gateways ) ) {
688
-		foreach ( $gateways as $key => $option ) {
689
-			$field['options'][ $key ] = $option['admin_label'];
687
+	if ( ! empty($gateways)) {
688
+		foreach ($gateways as $key => $option) {
689
+			$field['options'][$key] = $option['admin_label'];
690 690
 		}
691 691
 	}
692 692
 
693 693
 	// Add a field to the Give Form admin single post view of this field
694
-	if ( is_object( $post ) && 'give_forms' === $post->post_type ) {
695
-		$field['options'] = array_merge( array( 'global' => esc_html__( 'Global Default', 'give' ) ), $field['options'] );
694
+	if (is_object($post) && 'give_forms' === $post->post_type) {
695
+		$field['options'] = array_merge(array('global' => esc_html__('Global Default', 'give')), $field['options']);
696 696
 	}
697 697
 
698 698
 	// Render select field.
699
-	give_select( $field );
699
+	give_select($field);
700 700
 }
701 701
 
702 702
 /**
@@ -718,13 +718,13 @@  discard block
 block discarded – undo
718 718
  * @return void
719 719
  */
720 720
 
721
-function give_docs_link( $field ) {
722
-	$field['url']   = isset( $field['url'] ) ? $field['url'] : 'https://givewp.com/documentation';
723
-	$field['title'] = isset( $field['title'] ) ? $field['title'] : 'Documentation';
721
+function give_docs_link($field) {
722
+	$field['url']   = isset($field['url']) ? $field['url'] : 'https://givewp.com/documentation';
723
+	$field['title'] = isset($field['title']) ? $field['title'] : 'Documentation';
724 724
 
725
-	echo '<p class="give-docs-link"><a href="' . esc_url( $field['url'] )
725
+	echo '<p class="give-docs-link"><a href="'.esc_url($field['url'])
726 726
 	     . '" target="_blank">'
727
-	     . sprintf( esc_html__( 'Need Help? See docs on "%s"', 'give' ), $field['title'] )
727
+	     . sprintf(esc_html__('Need Help? See docs on "%s"', 'give'), $field['title'])
728 728
 	     . '<span class="dashicons dashicons-editor-help"></span></a></p>';
729 729
 }
730 730
 
@@ -740,13 +740,13 @@  discard block
 block discarded – undo
740 740
  *
741 741
  * @return mixed
742 742
  */
743
-function give_get_field_value( $field, $postid ) {
744
-	if ( isset( $field['attributes']['value'] ) ) {
743
+function give_get_field_value($field, $postid) {
744
+	if (isset($field['attributes']['value'])) {
745 745
 		return $field['attributes']['value'];
746 746
 	}
747 747
 
748 748
 	// Get value from db.
749
-	$field_value = give_get_meta( $postid, $field['id'], true );
749
+	$field_value = give_get_meta($postid, $field['id'], true);
750 750
 
751 751
 	/**
752 752
 	 * Filter the field value before apply default value.
@@ -755,10 +755,10 @@  discard block
 block discarded – undo
755 755
 	 *
756 756
 	 * @param mixed $field_value Field value.
757 757
 	 */
758
-	$field_value = apply_filters( "{$field['id']}_field_value", $field_value, $field, $postid );
758
+	$field_value = apply_filters("{$field['id']}_field_value", $field_value, $field, $postid);
759 759
 
760 760
 	// Set default value if no any data saved to db.
761
-	if ( ! $field_value && isset( $field['default'] ) ) {
761
+	if ( ! $field_value && isset($field['default'])) {
762 762
 		$field_value = $field['default'];
763 763
 	}
764 764
 
@@ -775,20 +775,20 @@  discard block
 block discarded – undo
775 775
  *
776 776
  * @return string
777 777
  */
778
-function give_get_field_description( $field ) {
778
+function give_get_field_description($field) {
779 779
 	$field_desc_html = '';
780 780
 	$description     = '';
781 781
 
782 782
 	// Check for both `description` and `desc`.
783
-	if ( isset( $field['description'] ) ) {
783
+	if (isset($field['description'])) {
784 784
 		$description = $field['description'];
785
-	} elseif ( isset( $field['desc'] ) ) {
785
+	} elseif (isset($field['desc'])) {
786 786
 		$description = $field['desc'];
787 787
 	}
788 788
 
789 789
 	// Set if there is a description.
790
-	if ( ! empty( $description ) ) {
791
-		$field_desc_html = '<span class="give-field-description">' . wp_kses_post( $description ) . '</span>';
790
+	if ( ! empty($description)) {
791
+		$field_desc_html = '<span class="give-field-description">'.wp_kses_post($description).'</span>';
792 792
 	}
793 793
 
794 794
 	return $field_desc_html;
@@ -804,18 +804,18 @@  discard block
 block discarded – undo
804 804
  *
805 805
  * @return string
806 806
  */
807
-function give_get_custom_attributes( $field ) {
807
+function give_get_custom_attributes($field) {
808 808
 	// Custom attribute handling
809 809
 	$custom_attributes = array();
810 810
 
811
-	if ( ! empty( $field['attributes'] ) && is_array( $field['attributes'] ) ) {
811
+	if ( ! empty($field['attributes']) && is_array($field['attributes'])) {
812 812
 
813
-		foreach ( $field['attributes'] as $attribute => $value ) {
814
-			$custom_attributes[] = esc_attr( $attribute ) . '="' . esc_attr( $value ) . '"';
813
+		foreach ($field['attributes'] as $attribute => $value) {
814
+			$custom_attributes[] = esc_attr($attribute).'="'.esc_attr($value).'"';
815 815
 		}
816 816
 	}
817 817
 
818
-	return implode( ' ', $custom_attributes );
818
+	return implode(' ', $custom_attributes);
819 819
 }
820 820
 
821 821
 /**
@@ -831,8 +831,8 @@  discard block
 block discarded – undo
831 831
  *
832 832
  * @return string
833 833
  */
834
-function give_get_repeater_field_value( $field, $field_group, $fields ) {
835
-	$field_value = ( isset( $field_group[ $field['id'] ] ) ? $field_group[ $field['id'] ] : '' );
834
+function give_get_repeater_field_value($field, $field_group, $fields) {
835
+	$field_value = (isset($field_group[$field['id']]) ? $field_group[$field['id']] : '');
836 836
 
837 837
 	/**
838 838
 	 * Filter the specific repeater field value
@@ -841,7 +841,7 @@  discard block
 block discarded – undo
841 841
 	 *
842 842
 	 * @param string $field_id
843 843
 	 */
844
-	$field_value = apply_filters( "give_get_repeater_field_{$field['id']}_value", $field_value, $field, $field_group, $fields );
844
+	$field_value = apply_filters("give_get_repeater_field_{$field['id']}_value", $field_value, $field, $field_group, $fields);
845 845
 
846 846
 	/**
847 847
 	 * Filter the repeater field value
@@ -850,7 +850,7 @@  discard block
 block discarded – undo
850 850
 	 *
851 851
 	 * @param string $field_id
852 852
 	 */
853
-	$field_value = apply_filters( 'give_get_repeater_field_value', $field_value, $field, $field_group, $fields );
853
+	$field_value = apply_filters('give_get_repeater_field_value', $field_value, $field, $field_group, $fields);
854 854
 
855 855
 	return $field_value;
856 856
 }
@@ -868,7 +868,7 @@  discard block
 block discarded – undo
868 868
  *
869 869
  * @return string
870 870
  */
871
-function give_get_repeater_field_id( $field, $fields, $default = false ) {
871
+function give_get_repeater_field_id($field, $fields, $default = false) {
872 872
 	$row_placeholder = false !== $default ? $default : '{{row-count-placeholder}}';
873 873
 
874 874
 	// Get field id.
@@ -881,7 +881,7 @@  discard block
 block discarded – undo
881 881
 	 *
882 882
 	 * @param string $field_id
883 883
 	 */
884
-	$field_id = apply_filters( "give_get_repeater_field_{$field['id']}_id", $field_id, $field, $fields, $default );
884
+	$field_id = apply_filters("give_get_repeater_field_{$field['id']}_id", $field_id, $field, $fields, $default);
885 885
 
886 886
 	/**
887 887
 	 * Filter the repeater field id
@@ -890,7 +890,7 @@  discard block
 block discarded – undo
890 890
 	 *
891 891
 	 * @param string $field_id
892 892
 	 */
893
-	$field_id = apply_filters( 'give_get_repeater_field_id', $field_id, $field, $fields, $default );
893
+	$field_id = apply_filters('give_get_repeater_field_id', $field_id, $field, $fields, $default);
894 894
 
895 895
 	return $field_id;
896 896
 }
@@ -905,8 +905,8 @@  discard block
 block discarded – undo
905 905
  *
906 906
  * @return string
907 907
  */
908
-function give_get_field_name( $field ) {
909
-	$field_name = esc_attr( empty( $field['repeat'] ) ? $field['id'] : $field['repeatable_field_id'] );
908
+function give_get_field_name($field) {
909
+	$field_name = esc_attr(empty($field['repeat']) ? $field['id'] : $field['repeatable_field_id']);
910 910
 
911 911
 	/**
912 912
 	 * Filter the field name.
@@ -915,7 +915,7 @@  discard block
 block discarded – undo
915 915
 	 *
916 916
 	 * @param string $field_name
917 917
 	 */
918
-	$field_name = apply_filters( 'give_get_field_name', $field_name, $field );
918
+	$field_name = apply_filters('give_get_field_name', $field_name, $field);
919 919
 
920 920
 	return $field_name;
921 921
 }
@@ -932,40 +932,40 @@  discard block
 block discarded – undo
932 932
  *
933 933
  * @return void
934 934
  */
935
-function _give_metabox_form_data_repeater_fields( $fields ) {
935
+function _give_metabox_form_data_repeater_fields($fields) {
936 936
 	global $thepostid, $post;
937 937
 
938 938
 	// Bailout.
939
-	if ( ! isset( $fields['fields'] ) || empty( $fields['fields'] ) ) {
939
+	if ( ! isset($fields['fields']) || empty($fields['fields'])) {
940 940
 		return;
941 941
 	}
942 942
 
943
-	$group_numbering = isset( $fields['options']['group_numbering'] ) ? (int) $fields['options']['group_numbering'] : 0;
944
-	$close_tabs      = isset( $fields['options']['close_tabs'] ) ? (int) $fields['options']['close_tabs'] : 0;
945
-	$wrapper_class   = isset( $fields['wrapper_class'] ) ? $fields['wrapper_class'] : '';
943
+	$group_numbering = isset($fields['options']['group_numbering']) ? (int) $fields['options']['group_numbering'] : 0;
944
+	$close_tabs      = isset($fields['options']['close_tabs']) ? (int) $fields['options']['close_tabs'] : 0;
945
+	$wrapper_class   = isset($fields['wrapper_class']) ? $fields['wrapper_class'] : '';
946 946
 	?>
947
-	<div class="give-repeatable-field-section <?php echo esc_attr( $wrapper_class ); ?>" id="<?php echo "{$fields['id']}_field"; ?>"
947
+	<div class="give-repeatable-field-section <?php echo esc_attr($wrapper_class); ?>" id="<?php echo "{$fields['id']}_field"; ?>"
948 948
 		 data-group-numbering="<?php echo $group_numbering; ?>" data-close-tabs="<?php echo $close_tabs; ?>">
949
-		<?php if ( ! empty( $fields['name'] ) ) : ?>
949
+		<?php if ( ! empty($fields['name'])) : ?>
950 950
 			<p class="give-repeater-field-name"><?php echo $fields['name']; ?></p>
951 951
 		<?php endif; ?>
952 952
 
953
-		<?php if ( ! empty( $fields['description'] ) ) : ?>
953
+		<?php if ( ! empty($fields['description'])) : ?>
954 954
 			<p class="give-repeater-field-description"><?php echo $fields['description']; ?></p>
955 955
 		<?php endif; ?>
956 956
 
957 957
 		<table class="give-repeatable-fields-section-wrapper" cellspacing="0">
958 958
 			<?php
959
-			$repeater_field_values = give_get_meta( $thepostid, $fields['id'], true );
960
-			$header_title          = isset( $fields['options']['header_title'] )
959
+			$repeater_field_values = give_get_meta($thepostid, $fields['id'], true);
960
+			$header_title          = isset($fields['options']['header_title'])
961 961
 				? $fields['options']['header_title']
962
-				: esc_attr__( 'Group', 'give' );
962
+				: esc_attr__('Group', 'give');
963 963
 
964 964
 			$add_default_donation_field = false;
965 965
 
966 966
 			// Check if level is not created or we have to add default level.
967
-			if ( is_array( $repeater_field_values ) && ( $fields_count = count( $repeater_field_values ) ) ) {
968
-				$repeater_field_values = array_values( $repeater_field_values );
967
+			if (is_array($repeater_field_values) && ($fields_count = count($repeater_field_values))) {
968
+				$repeater_field_values = array_values($repeater_field_values);
969 969
 			} else {
970 970
 				$fields_count               = 1;
971 971
 				$add_default_donation_field = true;
@@ -978,59 +978,59 @@  discard block
 block discarded – undo
978 978
 					<div class="give-row-head give-move">
979 979
 						<button type="button" class="handlediv button-link"><span class="toggle-indicator"></span>
980 980
 						</button>
981
-						<span class="give-remove" title="<?php esc_html_e( 'Remove Group', 'give' ); ?>">-</span>
981
+						<span class="give-remove" title="<?php esc_html_e('Remove Group', 'give'); ?>">-</span>
982 982
 						<h2>
983 983
 							<span data-header-title="<?php echo $header_title; ?>"><?php echo $header_title; ?></span>
984 984
 						</h2>
985 985
 					</div>
986 986
 					<div class="give-row-body">
987
-						<?php foreach ( $fields['fields'] as $field ) : ?>
988
-							<?php if ( ! give_is_field_callback_exist( $field ) ) {
987
+						<?php foreach ($fields['fields'] as $field) : ?>
988
+							<?php if ( ! give_is_field_callback_exist($field)) {
989 989
 								continue;
990 990
 } ?>
991 991
 							<?php
992 992
 							$field['repeat']              = true;
993
-							$field['repeatable_field_id'] = give_get_repeater_field_id( $field, $fields );
994
-							$field['id']                  = str_replace( array( '[', ']' ), array(
993
+							$field['repeatable_field_id'] = give_get_repeater_field_id($field, $fields);
994
+							$field['id']                  = str_replace(array('[', ']'), array(
995 995
 								'_',
996 996
 								'',
997
-							), $field['repeatable_field_id'] );
997
+							), $field['repeatable_field_id']);
998 998
 							?>
999
-							<?php give_render_field( $field ); ?>
999
+							<?php give_render_field($field); ?>
1000 1000
 						<?php endforeach; ?>
1001 1001
 					</div>
1002 1002
 				</td>
1003 1003
 			</tr>
1004 1004
 
1005
-			<?php if ( ! empty( $repeater_field_values ) ) : ?>
1005
+			<?php if ( ! empty($repeater_field_values)) : ?>
1006 1006
 				<!--Stored repeater field group-->
1007
-				<?php foreach ( $repeater_field_values as $index => $field_group ) : ?>
1007
+				<?php foreach ($repeater_field_values as $index => $field_group) : ?>
1008 1008
 					<tr class="give-row">
1009 1009
 						<td class="give-repeater-field-wrap give-column" colspan="2">
1010 1010
 							<div class="give-row-head give-move">
1011 1011
 								<button type="button" class="handlediv button-link">
1012 1012
 									<span class="toggle-indicator"></span></button>
1013
-								<span class="give-remove" title="<?php esc_html_e( 'Remove Group', 'give' ); ?>">-
1013
+								<span class="give-remove" title="<?php esc_html_e('Remove Group', 'give'); ?>">-
1014 1014
 								</span>
1015 1015
 								<h2>
1016 1016
 									<span data-header-title="<?php echo $header_title; ?>"><?php echo $header_title; ?></span>
1017 1017
 								</h2>
1018 1018
 							</div>
1019 1019
 							<div class="give-row-body">
1020
-								<?php foreach ( $fields['fields'] as $field ) : ?>
1021
-									<?php if ( ! give_is_field_callback_exist( $field ) ) {
1020
+								<?php foreach ($fields['fields'] as $field) : ?>
1021
+									<?php if ( ! give_is_field_callback_exist($field)) {
1022 1022
 										continue;
1023 1023
 } ?>
1024 1024
 									<?php
1025 1025
 									$field['repeat']              = true;
1026
-									$field['repeatable_field_id'] = give_get_repeater_field_id( $field, $fields, $index );
1027
-									$field['attributes']['value'] = give_get_repeater_field_value( $field, $field_group, $fields );
1028
-									$field['id']                  = str_replace( array( '[', ']' ), array(
1026
+									$field['repeatable_field_id'] = give_get_repeater_field_id($field, $fields, $index);
1027
+									$field['attributes']['value'] = give_get_repeater_field_value($field, $field_group, $fields);
1028
+									$field['id']                  = str_replace(array('[', ']'), array(
1029 1029
 										'_',
1030 1030
 										'',
1031
-									), $field['repeatable_field_id'] );
1031
+									), $field['repeatable_field_id']);
1032 1032
 									?>
1033
-									<?php give_render_field( $field ); ?>
1033
+									<?php give_render_field($field); ?>
1034 1034
 								<?php endforeach; ?>
1035 1035
 							</div>
1036 1036
 						</td>
@@ -1038,14 +1038,14 @@  discard block
 block discarded – undo
1038 1038
 				<?php endforeach;
1039 1039
 ; ?>
1040 1040
 
1041
-			<?php elseif ( $add_default_donation_field ) : ?>
1041
+			<?php elseif ($add_default_donation_field) : ?>
1042 1042
 				<!--Default repeater field group-->
1043 1043
 				<tr class="give-row">
1044 1044
 					<td class="give-repeater-field-wrap give-column" colspan="2">
1045 1045
 						<div class="give-row-head give-move">
1046 1046
 							<button type="button" class="handlediv button-link">
1047 1047
 								<span class="toggle-indicator"></span></button>
1048
-							<span class="give-remove" title="<?php esc_html_e( 'Remove Group', 'give' ); ?>">-
1048
+							<span class="give-remove" title="<?php esc_html_e('Remove Group', 'give'); ?>">-
1049 1049
 							</span>
1050 1050
 							<h2>
1051 1051
 								<span data-header-title="<?php echo $header_title; ?>"><?php echo $header_title; ?></span>
@@ -1053,19 +1053,19 @@  discard block
 block discarded – undo
1053 1053
 						</div>
1054 1054
 						<div class="give-row-body">
1055 1055
 							<?php
1056
-							foreach ( $fields['fields'] as $field ) :
1057
-								if ( ! give_is_field_callback_exist( $field ) ) {
1056
+							foreach ($fields['fields'] as $field) :
1057
+								if ( ! give_is_field_callback_exist($field)) {
1058 1058
 									continue;
1059 1059
 								}
1060 1060
 
1061 1061
 								$field['repeat']              = true;
1062
-								$field['repeatable_field_id'] = give_get_repeater_field_id( $field, $fields, 0 );
1063
-								$field['attributes']['value'] = apply_filters( "give_default_field_group_field_{$field['id']}_value", ( ! empty( $field['default'] ) ? $field['default'] : '' ), $field );
1064
-								$field['id']                  = str_replace( array( '[', ']' ), array(
1062
+								$field['repeatable_field_id'] = give_get_repeater_field_id($field, $fields, 0);
1063
+								$field['attributes']['value'] = apply_filters("give_default_field_group_field_{$field['id']}_value", ( ! empty($field['default']) ? $field['default'] : ''), $field);
1064
+								$field['id']                  = str_replace(array('[', ']'), array(
1065 1065
 									'_',
1066 1066
 									'',
1067
-								), $field['repeatable_field_id'] );
1068
-								give_render_field( $field );
1067
+								), $field['repeatable_field_id']);
1068
+								give_render_field($field);
1069 1069
 							endforeach;
1070 1070
 							?>
1071 1071
 						</div>
@@ -1076,9 +1076,9 @@  discard block
 block discarded – undo
1076 1076
 			<tfoot>
1077 1077
 			<tr>
1078 1078
 				<?php
1079
-				$add_row_btn_title = isset( $fields['options']['add_button'] )
1079
+				$add_row_btn_title = isset($fields['options']['add_button'])
1080 1080
 					? $add_row_btn_title = $fields['options']['add_button']
1081
-					: esc_html__( 'Add Row', 'give' );
1081
+					: esc_html__('Add Row', 'give');
1082 1082
 				?>
1083 1083
 				<td colspan="2" class="give-add-repeater-field-section-row-wrap">
1084 1084
 					<span class="button button-primary give-add-repeater-field-section-row"><?php echo $add_row_btn_title; ?></span>
@@ -1108,10 +1108,10 @@  discard block
 block discarded – undo
1108 1108
 	 *
1109 1109
 	 * @param string
1110 1110
 	 */
1111
-	$default_current_tab = apply_filters( "give_default_setting_tab_{$current_setting_page}", 'general' );
1111
+	$default_current_tab = apply_filters("give_default_setting_tab_{$current_setting_page}", 'general');
1112 1112
 
1113 1113
 	// Get current tab.
1114
-	$current_tab = empty( $_GET['tab'] ) ? $default_current_tab : urldecode( $_GET['tab'] );
1114
+	$current_tab = empty($_GET['tab']) ? $default_current_tab : urldecode($_GET['tab']);
1115 1115
 
1116 1116
 	// Output.
1117 1117
 	return $current_tab;
@@ -1135,10 +1135,10 @@  discard block
 block discarded – undo
1135 1135
 	 *
1136 1136
 	 * @param string
1137 1137
 	 */
1138
-	$default_current_section = apply_filters( "give_default_setting_tab_section_{$current_tab}", '' );
1138
+	$default_current_section = apply_filters("give_default_setting_tab_section_{$current_tab}", '');
1139 1139
 
1140 1140
 	// Get current section.
1141
-	$current_section = empty( $_REQUEST['section'] ) ? $default_current_section : urldecode( $_REQUEST['section'] );
1141
+	$current_section = empty($_REQUEST['section']) ? $default_current_section : urldecode($_REQUEST['section']);
1142 1142
 
1143 1143
 	// Output.
1144 1144
 	return $current_section;
@@ -1152,7 +1152,7 @@  discard block
 block discarded – undo
1152 1152
  */
1153 1153
 function give_get_current_setting_page() {
1154 1154
 	// Get current page.
1155
-	$setting_page = ! empty( $_GET['page'] ) ? urldecode( $_GET['page'] ) : '';
1155
+	$setting_page = ! empty($_GET['page']) ? urldecode($_GET['page']) : '';
1156 1156
 
1157 1157
 	// Output.
1158 1158
 	return $setting_page;
@@ -1172,13 +1172,13 @@  discard block
 block discarded – undo
1172 1172
  *
1173 1173
  * @return string
1174 1174
  */
1175
-function _give_display_content_field_value( $field_value, $field, $postid ) {
1176
-	$show_content = give_get_meta( $postid, '_give_content_option', true );
1175
+function _give_display_content_field_value($field_value, $field, $postid) {
1176
+	$show_content = give_get_meta($postid, '_give_content_option', true);
1177 1177
 
1178 1178
 	if (
1179
-		! give_get_meta( $postid, '_give_display_content', true )
1179
+		! give_get_meta($postid, '_give_display_content', true)
1180 1180
 		&& $show_content
1181
-		&& ( 'none' !== $show_content )
1181
+		&& ('none' !== $show_content)
1182 1182
 	) {
1183 1183
 		$field_value = 'enabled';
1184 1184
 	}
@@ -1186,7 +1186,7 @@  discard block
 block discarded – undo
1186 1186
 	return $field_value;
1187 1187
 }
1188 1188
 
1189
-add_filter( '_give_display_content_field_value', '_give_display_content_field_value', 10, 3 );
1189
+add_filter('_give_display_content_field_value', '_give_display_content_field_value', 10, 3);
1190 1190
 
1191 1191
 
1192 1192
 /**
@@ -1203,12 +1203,12 @@  discard block
 block discarded – undo
1203 1203
  *
1204 1204
  * @return string
1205 1205
  */
1206
-function _give_content_placement_field_value( $field_value, $field, $postid ) {
1207
-	$show_content = give_get_meta( $postid, '_give_content_option', true );
1206
+function _give_content_placement_field_value($field_value, $field, $postid) {
1207
+	$show_content = give_get_meta($postid, '_give_content_option', true);
1208 1208
 
1209 1209
 	if (
1210
-		! give_get_meta( $postid, '_give_content_placement', true )
1211
-		&& ( 'none' !== $show_content )
1210
+		! give_get_meta($postid, '_give_content_placement', true)
1211
+		&& ('none' !== $show_content)
1212 1212
 	) {
1213 1213
 		$field_value = $show_content;
1214 1214
 	}
@@ -1216,7 +1216,7 @@  discard block
 block discarded – undo
1216 1216
 	return $field_value;
1217 1217
 }
1218 1218
 
1219
-add_filter( '_give_content_placement_field_value', '_give_content_placement_field_value', 10, 3 );
1219
+add_filter('_give_content_placement_field_value', '_give_content_placement_field_value', 10, 3);
1220 1220
 
1221 1221
 
1222 1222
 /**
@@ -1232,17 +1232,17 @@  discard block
 block discarded – undo
1232 1232
  *
1233 1233
  * @return string
1234 1234
  */
1235
-function _give_terms_option_field_value( $field_value, $field, $postid ) {
1236
-	$term_option = give_get_meta( $postid, '_give_terms_option', true );
1235
+function _give_terms_option_field_value($field_value, $field, $postid) {
1236
+	$term_option = give_get_meta($postid, '_give_terms_option', true);
1237 1237
 
1238
-	if ( in_array( $term_option, array( 'none', 'yes' ) ) ) {
1239
-		$field_value = ( 'yes' === $term_option ? 'enabled' : 'disabled' );
1238
+	if (in_array($term_option, array('none', 'yes'))) {
1239
+		$field_value = ('yes' === $term_option ? 'enabled' : 'disabled');
1240 1240
 	}
1241 1241
 
1242 1242
 	return $field_value;
1243 1243
 }
1244 1244
 
1245
-add_filter( '_give_terms_option_field_value', '_give_terms_option_field_value', 10, 3 );
1245
+add_filter('_give_terms_option_field_value', '_give_terms_option_field_value', 10, 3);
1246 1246
 
1247 1247
 
1248 1248
 /**
@@ -1259,17 +1259,17 @@  discard block
 block discarded – undo
1259 1259
  *
1260 1260
  * @return string
1261 1261
  */
1262
-function _give_offline_donation_enable_billing_fields_single_field_value( $field_value, $field, $postid ) {
1263
-	$offline_donation = give_get_meta( $postid, '_give_offline_donation_enable_billing_fields_single', true );
1262
+function _give_offline_donation_enable_billing_fields_single_field_value($field_value, $field, $postid) {
1263
+	$offline_donation = give_get_meta($postid, '_give_offline_donation_enable_billing_fields_single', true);
1264 1264
 
1265
-	if ( 'on' === $offline_donation ) {
1265
+	if ('on' === $offline_donation) {
1266 1266
 		$field_value = 'enabled';
1267 1267
 	}
1268 1268
 
1269 1269
 	return $field_value;
1270 1270
 }
1271 1271
 
1272
-add_filter( '_give_offline_donation_enable_billing_fields_single_field_value', '_give_offline_donation_enable_billing_fields_single_field_value', 10, 3 );
1272
+add_filter('_give_offline_donation_enable_billing_fields_single_field_value', '_give_offline_donation_enable_billing_fields_single_field_value', 10, 3);
1273 1273
 
1274 1274
 
1275 1275
 /**
@@ -1285,17 +1285,17 @@  discard block
 block discarded – undo
1285 1285
  *
1286 1286
  * @return string
1287 1287
  */
1288
-function _give_custom_amount_field_value( $field_value, $field, $postid ) {
1289
-	$custom_amount = give_get_meta( $postid, '_give_custom_amount', true );
1288
+function _give_custom_amount_field_value($field_value, $field, $postid) {
1289
+	$custom_amount = give_get_meta($postid, '_give_custom_amount', true);
1290 1290
 
1291
-	if ( in_array( $custom_amount, array( 'yes', 'no' ) ) ) {
1292
-		$field_value = ( 'yes' === $custom_amount ? 'enabled' : 'disabled' );
1291
+	if (in_array($custom_amount, array('yes', 'no'))) {
1292
+		$field_value = ('yes' === $custom_amount ? 'enabled' : 'disabled');
1293 1293
 	}
1294 1294
 
1295 1295
 	return $field_value;
1296 1296
 }
1297 1297
 
1298
-add_filter( '_give_custom_amount_field_value', '_give_custom_amount_field_value', 10, 3 );
1298
+add_filter('_give_custom_amount_field_value', '_give_custom_amount_field_value', 10, 3);
1299 1299
 
1300 1300
 
1301 1301
 /**
@@ -1311,17 +1311,17 @@  discard block
 block discarded – undo
1311 1311
  *
1312 1312
  * @return string
1313 1313
  */
1314
-function _give_goal_option_field_value( $field_value, $field, $postid ) {
1315
-	$goal_option = give_get_meta( $postid, '_give_goal_option', true );
1314
+function _give_goal_option_field_value($field_value, $field, $postid) {
1315
+	$goal_option = give_get_meta($postid, '_give_goal_option', true);
1316 1316
 
1317
-	if ( in_array( $goal_option, array( 'yes', 'no' ) ) ) {
1318
-		$field_value = ( 'yes' === $goal_option ? 'enabled' : 'disabled' );
1317
+	if (in_array($goal_option, array('yes', 'no'))) {
1318
+		$field_value = ('yes' === $goal_option ? 'enabled' : 'disabled');
1319 1319
 	}
1320 1320
 
1321 1321
 	return $field_value;
1322 1322
 }
1323 1323
 
1324
-add_filter( '_give_goal_option_field_value', '_give_goal_option_field_value', 10, 3 );
1324
+add_filter('_give_goal_option_field_value', '_give_goal_option_field_value', 10, 3);
1325 1325
 
1326 1326
 /**
1327 1327
  * Set value for Donation Goal --> close Form.
@@ -1337,17 +1337,17 @@  discard block
 block discarded – undo
1337 1337
  *
1338 1338
  * @return string
1339 1339
  */
1340
-function _give_close_form_when_goal_achieved_value( $field_value, $field, $postid ) {
1341
-	$close_form = give_get_meta( $postid, '_give_close_form_when_goal_achieved', true );
1340
+function _give_close_form_when_goal_achieved_value($field_value, $field, $postid) {
1341
+	$close_form = give_get_meta($postid, '_give_close_form_when_goal_achieved', true);
1342 1342
 
1343
-	if ( in_array( $close_form, array( 'yes', 'no' ) ) ) {
1344
-		$field_value = ( 'yes' === $close_form ? 'enabled' : 'disabled' );
1343
+	if (in_array($close_form, array('yes', 'no'))) {
1344
+		$field_value = ('yes' === $close_form ? 'enabled' : 'disabled');
1345 1345
 	}
1346 1346
 
1347 1347
 	return $field_value;
1348 1348
 }
1349 1349
 
1350
-add_filter( '_give_close_form_when_goal_achieved_field_value', '_give_close_form_when_goal_achieved_value', 10, 3 );
1350
+add_filter('_give_close_form_when_goal_achieved_field_value', '_give_close_form_when_goal_achieved_value', 10, 3);
1351 1351
 
1352 1352
 
1353 1353
 /**
@@ -1363,17 +1363,17 @@  discard block
 block discarded – undo
1363 1363
  *
1364 1364
  * @return string
1365 1365
  */
1366
-function _give_logged_in_only_value( $field_value, $field, $postid ) {
1367
-	$guest_donation = give_get_meta( $postid, '_give_logged_in_only', true );
1366
+function _give_logged_in_only_value($field_value, $field, $postid) {
1367
+	$guest_donation = give_get_meta($postid, '_give_logged_in_only', true);
1368 1368
 
1369
-	if ( in_array( $guest_donation, array( 'yes', 'no' ) ) ) {
1370
-		$field_value = ( 'yes' === $guest_donation ? 'enabled' : 'disabled' );
1369
+	if (in_array($guest_donation, array('yes', 'no'))) {
1370
+		$field_value = ('yes' === $guest_donation ? 'enabled' : 'disabled');
1371 1371
 	}
1372 1372
 
1373 1373
 	return $field_value;
1374 1374
 }
1375 1375
 
1376
-add_filter( '_give_logged_in_only_field_value', '_give_logged_in_only_value', 10, 3 );
1376
+add_filter('_give_logged_in_only_field_value', '_give_logged_in_only_value', 10, 3);
1377 1377
 
1378 1378
 /**
1379 1379
  * Set value for Offline Donations --> Offline Donations.
@@ -1389,17 +1389,17 @@  discard block
 block discarded – undo
1389 1389
  *
1390 1390
  * @return string
1391 1391
  */
1392
-function _give_customize_offline_donations_value( $field_value, $field, $postid ) {
1393
-	$customize_offline_text = give_get_meta( $postid, '_give_customize_offline_donations', true );
1392
+function _give_customize_offline_donations_value($field_value, $field, $postid) {
1393
+	$customize_offline_text = give_get_meta($postid, '_give_customize_offline_donations', true);
1394 1394
 
1395
-	if ( in_array( $customize_offline_text, array( 'yes', 'no' ) ) ) {
1396
-		$field_value = ( 'yes' === $customize_offline_text ? 'enabled' : 'disabled' );
1395
+	if (in_array($customize_offline_text, array('yes', 'no'))) {
1396
+		$field_value = ('yes' === $customize_offline_text ? 'enabled' : 'disabled');
1397 1397
 	}
1398 1398
 
1399 1399
 	return $field_value;
1400 1400
 }
1401 1401
 
1402
-add_filter( '_give_customize_offline_donations_field_value', '_give_customize_offline_donations_value', 10, 3 );
1402
+add_filter('_give_customize_offline_donations_field_value', '_give_customize_offline_donations_value', 10, 3);
1403 1403
 
1404 1404
 
1405 1405
 /**
@@ -1414,14 +1414,14 @@  discard block
 block discarded – undo
1414 1414
  *
1415 1415
  * @return mixed
1416 1416
  */
1417
-function _give_set_multi_level_repeater_field_id( $field_id, $field, $fields, $default ) {
1417
+function _give_set_multi_level_repeater_field_id($field_id, $field, $fields, $default) {
1418 1418
 	$row_placeholder = false !== $default ? $default : '{{row-count-placeholder}}';
1419 1419
 	$field_id        = "{$fields['id']}[{$row_placeholder}][{$field['id']}][level_id]";
1420 1420
 
1421 1421
 	return $field_id;
1422 1422
 }
1423 1423
 
1424
-add_filter( 'give_get_repeater_field__give_id_id', '_give_set_multi_level_repeater_field_id', 10, 4 );
1424
+add_filter('give_get_repeater_field__give_id_id', '_give_set_multi_level_repeater_field_id', 10, 4);
1425 1425
 
1426 1426
 /**
1427 1427
  * Set repeater field value for multi donation form.
@@ -1435,13 +1435,13 @@  discard block
 block discarded – undo
1435 1435
  *
1436 1436
  * @return mixed
1437 1437
  */
1438
-function _give_set_multi_level_repeater_field_value( $field_value, $field, $field_group, $fields ) {
1439
-	$field_value = $field_group[ $field['id'] ]['level_id'];
1438
+function _give_set_multi_level_repeater_field_value($field_value, $field, $field_group, $fields) {
1439
+	$field_value = $field_group[$field['id']]['level_id'];
1440 1440
 
1441 1441
 	return $field_value;
1442 1442
 }
1443 1443
 
1444
-add_filter( 'give_get_repeater_field__give_id_value', '_give_set_multi_level_repeater_field_value', 10, 4 );
1444
+add_filter('give_get_repeater_field__give_id_value', '_give_set_multi_level_repeater_field_value', 10, 4);
1445 1445
 
1446 1446
 /**
1447 1447
  * Set default value for _give_id field.
@@ -1452,11 +1452,11 @@  discard block
 block discarded – undo
1452 1452
  *
1453 1453
  * @return string
1454 1454
  */
1455
-function _give_set_field_give_id_default_value( $field ) {
1455
+function _give_set_field_give_id_default_value($field) {
1456 1456
 	return 0;
1457 1457
 }
1458 1458
 
1459
-add_filter( 'give_default_field_group_field__give_id_value', '_give_set_field_give_id_default_value' );
1459
+add_filter('give_default_field_group_field__give_id_value', '_give_set_field_give_id_default_value');
1460 1460
 
1461 1461
 /**
1462 1462
  * Set default value for _give_default field.
@@ -1467,11 +1467,11 @@  discard block
 block discarded – undo
1467 1467
  *
1468 1468
  * @return string
1469 1469
  */
1470
-function _give_set_field_give_default_default_value( $field ) {
1470
+function _give_set_field_give_default_default_value($field) {
1471 1471
 	return 'default';
1472 1472
 }
1473 1473
 
1474
-add_filter( 'give_default_field_group_field__give_default_value', '_give_set_field_give_default_default_value' );
1474
+add_filter('give_default_field_group_field__give_default_value', '_give_set_field_give_default_default_value');
1475 1475
 
1476 1476
 /**
1477 1477
  * Set repeater field editor id for field type wysiwyg.
@@ -1483,12 +1483,12 @@  discard block
 block discarded – undo
1483 1483
  *
1484 1484
  * @return string
1485 1485
  */
1486
-function give_repeater_field_set_editor_id( $field_name, $field ) {
1487
-	if ( isset( $field['repeatable_field_id'] ) && 'wysiwyg' == $field['type'] ) {
1488
-		$field_name = '_give_repeater_' . uniqid() . '_wysiwyg';
1486
+function give_repeater_field_set_editor_id($field_name, $field) {
1487
+	if (isset($field['repeatable_field_id']) && 'wysiwyg' == $field['type']) {
1488
+		$field_name = '_give_repeater_'.uniqid().'_wysiwyg';
1489 1489
 	}
1490 1490
 
1491 1491
 	return $field_name;
1492 1492
 }
1493 1493
 
1494
-add_filter( 'give_get_field_name', 'give_repeater_field_set_editor_id', 10, 2 );
1494
+add_filter('give_get_field_name', 'give_repeater_field_set_editor_id', 10, 2);
Please login to merge, or discard this patch.
includes/admin/shortcodes/class-shortcode-button.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -113,7 +113,7 @@
 block discarded – undo
113 113
 	/**
114 114
 	 * Adds the "Donation Form" button above the TinyMCE Editor on add/edit screens.
115 115
 	 *
116
-	 * @return string|bool
116
+	 * @return false|null
117 117
 	 *
118 118
 	 * @since 1.0
119 119
 	 */
Please login to merge, or discard this patch.
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -138,8 +138,8 @@
 block discarded – undo
138 138
 
139 139
 		// Only run in admin post/page creation and edit screens
140 140
 		if ( in_array( $screen->parent_file, $shortcode_button_pages )
141
-		     && apply_filters( 'give_shortcode_button_condition', true )
142
-		     && ! empty( self::$shortcodes )
141
+			 && apply_filters( 'give_shortcode_button_condition', true )
142
+			 && ! empty( self::$shortcodes )
143 143
 		) {
144 144
 
145 145
 			$shortcodes = array();
Please login to merge, or discard this patch.
Spacing   +51 added lines, -51 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
  */
13 13
 
14 14
 // Exit if accessed directly.
15
-if ( ! defined( 'ABSPATH' ) ) {
15
+if ( ! defined('ABSPATH')) {
16 16
 	exit;
17 17
 }
18 18
 
@@ -33,16 +33,16 @@  discard block
 block discarded – undo
33 33
 	 */
34 34
 	public function __construct() {
35 35
 
36
-		if ( is_admin() ) {
37
-			add_filter( 'mce_external_plugins', array( $this, 'mce_external_plugins' ), 15 );
36
+		if (is_admin()) {
37
+			add_filter('mce_external_plugins', array($this, 'mce_external_plugins'), 15);
38 38
 
39
-			add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_assets' ) );
40
-			add_action( 'admin_enqueue_scripts', array( $this, 'admin_localize_scripts' ), 13 );
41
-			add_action( 'media_buttons', array( $this, 'shortcode_button' ) );
39
+			add_action('admin_enqueue_scripts', array($this, 'admin_enqueue_assets'));
40
+			add_action('admin_enqueue_scripts', array($this, 'admin_localize_scripts'), 13);
41
+			add_action('media_buttons', array($this, 'shortcode_button'));
42 42
 		}
43 43
 
44
-		add_action( "wp_ajax_give_shortcode", array( $this, 'shortcode_ajax' ) );
45
-		add_action( "wp_ajax_nopriv_give_shortcode", array( $this, 'shortcode_ajax' ) );
44
+		add_action("wp_ajax_give_shortcode", array($this, 'shortcode_ajax'));
45
+		add_action("wp_ajax_nopriv_give_shortcode", array($this, 'shortcode_ajax'));
46 46
 	}
47 47
 
48 48
 	/**
@@ -54,15 +54,15 @@  discard block
 block discarded – undo
54 54
 	 *
55 55
 	 * @since 1.0
56 56
 	 */
57
-	public function mce_external_plugins( $plugin_array ) {
57
+	public function mce_external_plugins($plugin_array) {
58 58
 
59
-		if ( ! current_user_can( 'edit_posts' ) && ! current_user_can( 'edit_pages' ) ) {
59
+		if ( ! current_user_can('edit_posts') && ! current_user_can('edit_pages')) {
60 60
 			return false;
61 61
 		}
62 62
 
63
-		$suffix = ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '' : '.min';
63
+		$suffix = (defined('SCRIPT_DEBUG') && SCRIPT_DEBUG) ? '' : '.min';
64 64
 
65
-		$plugin_array['give_shortcode'] = GIVE_PLUGIN_URL . 'assets/js/admin/tinymce/mce-plugin' . $suffix . '.js';
65
+		$plugin_array['give_shortcode'] = GIVE_PLUGIN_URL.'assets/js/admin/tinymce/mce-plugin'.$suffix.'.js';
66 66
 
67 67
 		return $plugin_array;
68 68
 	}
@@ -76,12 +76,12 @@  discard block
 block discarded – undo
76 76
 	 */
77 77
 	public function admin_enqueue_assets() {
78 78
 
79
-		$suffix = ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '' : '.min';
79
+		$suffix = (defined('SCRIPT_DEBUG') && SCRIPT_DEBUG) ? '' : '.min';
80 80
 
81 81
 		wp_enqueue_script(
82 82
 			'give_shortcode',
83
-			GIVE_PLUGIN_URL . 'assets/js/admin/admin-shortcodes' . $suffix . '.js',
84
-			array( 'jquery' ),
83
+			GIVE_PLUGIN_URL.'assets/js/admin/admin-shortcodes'.$suffix.'.js',
84
+			array('jquery'),
85 85
 			GIVE_VERSION,
86 86
 			true
87 87
 		);
@@ -96,17 +96,17 @@  discard block
 block discarded – undo
96 96
 	 */
97 97
 	public function admin_localize_scripts() {
98 98
 
99
-		if ( ! empty( self::$shortcodes ) ) {
99
+		if ( ! empty(self::$shortcodes)) {
100 100
 
101 101
 			$variables = array();
102 102
 
103
-			foreach ( self::$shortcodes as $shortcode => $values ) {
104
-				if ( ! empty( $values['required'] ) ) {
105
-					$variables[ $shortcode ] = $values['required'];
103
+			foreach (self::$shortcodes as $shortcode => $values) {
104
+				if ( ! empty($values['required'])) {
105
+					$variables[$shortcode] = $values['required'];
106 106
 				}
107 107
 			}
108 108
 
109
-			wp_localize_script( 'give_shortcode', 'scShortcodes', $variables );
109
+			wp_localize_script('give_shortcode', 'scShortcodes', $variables);
110 110
 		}
111 111
 	}
112 112
 
@@ -123,37 +123,37 @@  discard block
 block discarded – undo
123 123
 
124 124
 		// If we load wp editor by ajax then $screen will be empty which generate notice if we treat $screen as WP_Screen object.
125 125
 		// For example we are loading wp editor by ajax in repeater field.
126
-		if ( ! ( $screen instanceof WP_Screen ) ) {
126
+		if ( ! ($screen instanceof WP_Screen)) {
127 127
 			return false;
128 128
 		}
129 129
 
130
-		$shortcode_button_pages = apply_filters( 'give_shortcode_button_pages', array(
130
+		$shortcode_button_pages = apply_filters('give_shortcode_button_pages', array(
131 131
 			'post.php',
132 132
 			'page.php',
133 133
 			'post-new.php',
134 134
 			'post-edit.php',
135 135
 			'edit.php',
136 136
 			'edit.php?post_type=page',
137
-		) );
137
+		));
138 138
 
139 139
 		// Only run in admin post/page creation and edit screens
140
-		if ( in_array( $screen->parent_file, $shortcode_button_pages )
141
-		     && apply_filters( 'give_shortcode_button_condition', true )
142
-		     && ! empty( self::$shortcodes )
140
+		if (in_array($screen->parent_file, $shortcode_button_pages)
141
+		     && apply_filters('give_shortcode_button_condition', true)
142
+		     && ! empty(self::$shortcodes)
143 143
 		) {
144 144
 
145 145
 			$shortcodes = array();
146 146
 
147
-			foreach ( self::$shortcodes as $shortcode => $values ) {
147
+			foreach (self::$shortcodes as $shortcode => $values) {
148 148
 
149 149
 				/**
150 150
 				 * Filters the condition for including the current shortcode
151 151
 				 *
152 152
 				 * @since 1.0
153 153
 				 */
154
-				if ( apply_filters( sanitize_title( $shortcode ) . '_condition', true ) ) {
154
+				if (apply_filters(sanitize_title($shortcode).'_condition', true)) {
155 155
 
156
-					$shortcodes[ $shortcode ] = sprintf(
156
+					$shortcodes[$shortcode] = sprintf(
157 157
 						'<div class="sc-shortcode mce-menu-item give-shortcode-item-%1$s" data-shortcode="%2$s">%3$s</div>',
158 158
 						$shortcode,
159 159
 						$shortcode,
@@ -162,37 +162,37 @@  discard block
 block discarded – undo
162 162
 				}
163 163
 			}
164 164
 
165
-			if ( ! empty( $shortcodes ) ) {
165
+			if ( ! empty($shortcodes)) {
166 166
 
167 167
 				// check current WP version
168
-				$img = ( version_compare( get_bloginfo( 'version' ), '3.5', '<' ) )
169
-					? '<img src="' . GIVE_PLUGIN_URL . 'assets/images/give-media.png" />'
170
-					: '<span class="wp-media-buttons-icon" id="give-media-button" style="background-image: url(' . give_svg_icons( 'give_grey' ) . ');"></span>';
168
+				$img = (version_compare(get_bloginfo('version'), '3.5', '<'))
169
+					? '<img src="'.GIVE_PLUGIN_URL.'assets/images/give-media.png" />'
170
+					: '<span class="wp-media-buttons-icon" id="give-media-button" style="background-image: url('.give_svg_icons('give_grey').');"></span>';
171 171
 
172
-				reset( $shortcodes );
172
+				reset($shortcodes);
173 173
 
174
-				if ( count( $shortcodes ) == 1 ) {
174
+				if (count($shortcodes) == 1) {
175 175
 
176
-					$shortcode = key( $shortcodes );
176
+					$shortcode = key($shortcodes);
177 177
 
178 178
 					printf(
179 179
 						'<button class="button sc-shortcode" data-shortcode="%s">%s</button>',
180 180
 						$shortcode,
181
-						sprintf( '%s %s %s',
181
+						sprintf('%s %s %s',
182 182
 							$img,
183
-							esc_html__( 'Insert', 'give' ),
184
-							self::$shortcodes[ $shortcode ]['label']
183
+							esc_html__('Insert', 'give'),
184
+							self::$shortcodes[$shortcode]['label']
185 185
 						)
186 186
 					);
187 187
 				} else {
188 188
 					printf(
189
-						'<div class="sc-wrap">' .
190
-						'<button class="button sc-button">%s %s</button>' .
191
-						'<div class="sc-menu mce-menu">%s</div>' .
189
+						'<div class="sc-wrap">'.
190
+						'<button class="button sc-button">%s %s</button>'.
191
+						'<div class="sc-menu mce-menu">%s</div>'.
192 192
 						'</div>',
193 193
 						$img,
194
-						esc_html__( 'Give Shortcodes', 'give' ),
195
-						implode( '', array_values( $shortcodes ) )
194
+						esc_html__('Give Shortcodes', 'give'),
195
+						implode('', array_values($shortcodes))
196 196
 					);
197 197
 				}
198 198
 			}
@@ -208,15 +208,15 @@  discard block
 block discarded – undo
208 208
 	 */
209 209
 	public function shortcode_ajax() {
210 210
 
211
-		$shortcode = isset( $_POST['shortcode'] ) ? $_POST['shortcode'] : false;
211
+		$shortcode = isset($_POST['shortcode']) ? $_POST['shortcode'] : false;
212 212
 		$response  = false;
213 213
 
214
-		if ( $shortcode && array_key_exists( $shortcode, self::$shortcodes ) ) {
214
+		if ($shortcode && array_key_exists($shortcode, self::$shortcodes)) {
215 215
 
216
-			$data = self::$shortcodes[ $shortcode ];
216
+			$data = self::$shortcodes[$shortcode];
217 217
 
218
-			if ( ! empty( $data['errors'] ) ) {
219
-				$data['btn_okay'] = array( esc_html__( 'Okay', 'give' ) );
218
+			if ( ! empty($data['errors'])) {
219
+				$data['btn_okay'] = array(esc_html__('Okay', 'give'));
220 220
 			}
221 221
 
222 222
 			$response = array(
@@ -228,10 +228,10 @@  discard block
 block discarded – undo
228 228
 			);
229 229
 		} else {
230 230
 			// todo: handle error
231
-			error_log( print_r( 'AJAX error!', 1 ) );
231
+			error_log(print_r('AJAX error!', 1));
232 232
 		}
233 233
 
234
-		wp_send_json( $response );
234
+		wp_send_json($response);
235 235
 	}
236 236
 }
237 237
 
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   +316 added lines, -316 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 inline">
25
-	<p class="give-debug-report-text"><?php sprintf(_e( 'Please copy and paste this information in your ticket when contacting support:', 'give' )); ?> </p>
25
+	<p class="give-debug-report-text"><?php sprintf(_e('Please copy and paste this information in your ticket when contacting support:', 'give')); ?> </p>
26 26
 	<div class="give-debug-report-actions">
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' ); ?> <span class="dashicons dashicons-external"></span></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'); ?> <span class="dashicons dashicons-external"></span></a>
29 29
 	</div>
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 Statuses"><?php _e( 'Registered Post Statuses', '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 statuses.', 'give' ) ); ?>"></span></td>
153
-			<td><?php echo esc_html( implode( ', ', get_post_stati() ) ); ?></td>
151
+			<td data-export-label="Registered Post Statuses"><?php _e('Registered Post Statuses', '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 statuses.', 'give')); ?>"></span></td>
153
+			<td><?php echo esc_html(implode(', ', get_post_stati())); ?></td>
154 154
 		</tr>
155 155
 	</tbody>
156 156
 </table>
@@ -158,90 +158,90 @@  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="TLS Connection"><?php _e( 'TLS Connection', 'give' ); ?>:</td>
172
-			<td class="help"><span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php echo esc_attr( __( 'Most payment gateway APIs only support connections using the TLS 1.2 security protocol.', 'give' ) ); ?>"></span></td>
171
+			<td data-export-label="TLS Connection"><?php _e('TLS Connection', 'give'); ?>:</td>
172
+			<td class="help"><span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php echo esc_attr(__('Most payment gateway APIs only support connections using the TLS 1.2 security protocol.', 'give')); ?>"></span></td>
173 173
 			<td><?php
174
-				$tls_check = wp_remote_post( 'https://www.howsmyssl.com/a/check' );
175
-				if ( ! is_wp_error( $tls_check ) ) {
176
-					$tls_check = json_decode( wp_remote_retrieve_body( $tls_check ) );
174
+				$tls_check = wp_remote_post('https://www.howsmyssl.com/a/check');
175
+				if ( ! is_wp_error($tls_check)) {
176
+					$tls_check = json_decode(wp_remote_retrieve_body($tls_check));
177 177
 					/* translators: %s: SSL connection response */
178
-					printf( __('Connection uses %s', 'give'), esc_html( $tls_check->tls_version )) ;
178
+					printf(__('Connection uses %s', 'give'), esc_html($tls_check->tls_version));
179 179
 				}
180 180
 				?></td>
181 181
 		</tr>
182 182
 		<tr>
183
-			<td data-export-label="TLS Connection"><?php _e( 'TLS Rating', 'give' ); ?>:</td>
184
-			<td class="help"><span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php echo esc_attr( __( 'The server\'s connection as rated by https://www.howsmyssl.com/', 'give' ) ); ?>"></span></td>
185
-			<td><?php if ( ! is_wp_error( $tls_check ) ) {
186
-					esc_html_e( $tls_check->rating);
183
+			<td data-export-label="TLS Connection"><?php _e('TLS Rating', 'give'); ?>:</td>
184
+			<td class="help"><span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php echo esc_attr(__('The server\'s connection as rated by https://www.howsmyssl.com/', 'give')); ?>"></span></td>
185
+			<td><?php if ( ! is_wp_error($tls_check)) {
186
+					esc_html_e($tls_check->rating);
187 187
 				} ?></td>
188 188
 		</tr>
189 189
 		<tr>
190
-			<td data-export-label="Server Info"><?php _e( 'Server Info', 'give' ); ?>:</td>
191
-			<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>
192
-			<td><?php echo esc_html( $_SERVER['SERVER_SOFTWARE'] ); ?></td>
190
+			<td data-export-label="Server Info"><?php _e('Server Info', 'give'); ?>:</td>
191
+			<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>
192
+			<td><?php echo esc_html($_SERVER['SERVER_SOFTWARE']); ?></td>
193 193
 		</tr>
194 194
 		<tr>
195
-			<td data-export-label="PHP Version"><?php _e( 'PHP Version', 'give' ); ?>:</td>
196
-			<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>
195
+			<td data-export-label="PHP Version"><?php _e('PHP Version', 'give'); ?>:</td>
196
+			<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>
197 197
 			<td><?php
198 198
 				// Check if phpversion function exists.
199
-				if ( function_exists( 'phpversion' ) ) {
199
+				if (function_exists('phpversion')) {
200 200
 					$php_version = phpversion();
201 201
 
202
-					if ( version_compare( $php_version, '5.6', '<' ) ) {
203
-						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>';
202
+					if (version_compare($php_version, '5.6', '<')) {
203
+						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>';
204 204
 					} else {
205
-						echo '<mark class="yes">' . esc_html( $php_version ) . '</mark>';
205
+						echo '<mark class="yes">'.esc_html($php_version).'</mark>';
206 206
 					}
207 207
 				} else {
208
-					_e( "Couldn't determine PHP version because phpversion() doesn't exist.", 'give' );
208
+					_e("Couldn't determine PHP version because phpversion() doesn't exist.", 'give');
209 209
 				}
210 210
 				?></td>
211 211
 		</tr>
212
-		<?php if ( function_exists( 'ini_get' ) ) : ?>
212
+		<?php if (function_exists('ini_get')) : ?>
213 213
 			<tr>
214
-				<td data-export-label="PHP Post Max Size"><?php _e( 'PHP Post Max Size', 'give' ); ?>:</td>
215
-				<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>
216
-				<td><?php echo size_format( give_let_to_num( ini_get( 'post_max_size' ) ) ); ?></td>
214
+				<td data-export-label="PHP Post Max Size"><?php _e('PHP Post Max Size', 'give'); ?>:</td>
215
+				<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>
216
+				<td><?php echo size_format(give_let_to_num(ini_get('post_max_size'))); ?></td>
217 217
 			</tr>
218 218
 			<tr>
219
-				<td data-export-label="PHP Time Limit"><?php _e( 'PHP Time Limit', 'give' ); ?>:</td>
220
-				<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>
221
-				<td><?php echo ini_get( 'max_execution_time' ); ?></td>
219
+				<td data-export-label="PHP Time Limit"><?php _e('PHP Time Limit', 'give'); ?>:</td>
220
+				<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>
221
+				<td><?php echo ini_get('max_execution_time'); ?></td>
222 222
 			</tr>
223 223
 			<tr>
224
-				<td data-export-label="PHP Max Input Vars"><?php _e( 'PHP Max Input Vars', 'give' ); ?>:</td>
225
-				<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>
226
-				<td><?php echo ini_get( 'max_input_vars' ); ?></td>
224
+				<td data-export-label="PHP Max Input Vars"><?php _e('PHP Max Input Vars', 'give'); ?>:</td>
225
+				<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>
226
+				<td><?php echo ini_get('max_input_vars'); ?></td>
227 227
 			</tr>
228 228
 			<tr>
229
-				<td data-export-label="PHP Max Upload Size"><?php _e( 'PHP Max Upload Size', 'give' ); ?>:</td>
230
-				<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>
231
-				<td><?php echo size_format( wp_max_upload_size() ); ?></td>
229
+				<td data-export-label="PHP Max Upload Size"><?php _e('PHP Max Upload Size', 'give'); ?>:</td>
230
+				<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>
231
+				<td><?php echo size_format(wp_max_upload_size()); ?></td>
232 232
 			</tr>
233 233
 			<tr>
234
-				<td data-export-label="cURL Version"><?php _e( 'cURL Version', 'give' ); ?>:</td>
235
-				<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>
234
+				<td data-export-label="cURL Version"><?php _e('cURL Version', 'give'); ?>:</td>
235
+				<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>
236 236
 				<td>
237 237
 					<?php
238
-					if ( function_exists( 'curl_version' ) ) {
238
+					if (function_exists('curl_version')) {
239 239
 						$curl_version = curl_version();
240 240
 
241
-						if ( version_compare( $curl_version['version'], '7.40', '<' ) ) {
242
-							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>';
241
+						if (version_compare($curl_version['version'], '7.40', '<')) {
242
+							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>';
243 243
 						} else {
244
-							echo '<mark class="yes">' . esc_html( $curl_version['version'] . ', ' . $curl_version['ssl_version'] ) . '</mark>';
244
+							echo '<mark class="yes">'.esc_html($curl_version['version'].', '.$curl_version['ssl_version']).'</mark>';
245 245
 						}
246 246
 					} else {
247 247
 						echo '&ndash';
@@ -250,42 +250,42 @@  discard block
 block discarded – undo
250 250
 				</td>
251 251
 			</tr>
252 252
 			<tr>
253
-				<td data-export-label="SUHOSIN Installed"><?php _e( 'SUHOSIN Installed', 'give' ); ?>:</td>
254
-				<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>
255
-				<td><?php echo extension_loaded( 'suhosin' ) ? '<span class="dashicons dashicons-yes"></span>' : '&ndash;'; ?></td>
253
+				<td data-export-label="SUHOSIN Installed"><?php _e('SUHOSIN Installed', 'give'); ?>:</td>
254
+				<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>
255
+				<td><?php echo extension_loaded('suhosin') ? '<span class="dashicons dashicons-yes"></span>' : '&ndash;'; ?></td>
256 256
 			</tr>
257 257
 		<?php endif;
258 258
 
259
-		if ( $wpdb->use_mysqli ) {
260
-			$ver = mysqli_get_server_info( $wpdb->dbh );
259
+		if ($wpdb->use_mysqli) {
260
+			$ver = mysqli_get_server_info($wpdb->dbh);
261 261
 		} else {
262 262
 			$ver = mysql_get_server_info();
263 263
 		}
264 264
 
265
-		if ( ! empty( $wpdb->is_mysql ) && ! stristr( $ver, 'MariaDB' ) ) : ?>
265
+		if ( ! empty($wpdb->is_mysql) && ! stristr($ver, 'MariaDB')) : ?>
266 266
 			<tr>
267
-				<td data-export-label="MySQL Version"><?php _e( 'MySQL Version', 'give' ); ?>:</td>
268
-				<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>
267
+				<td data-export-label="MySQL Version"><?php _e('MySQL Version', 'give'); ?>:</td>
268
+				<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>
269 269
 				<td>
270 270
 					<?php
271 271
 					$mysql_version = $wpdb->db_version();
272 272
 
273
-					if ( version_compare( $mysql_version, '5.6', '<' ) ) {
274
-						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>';
273
+					if (version_compare($mysql_version, '5.6', '<')) {
274
+						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>';
275 275
 					} else {
276
-						echo '<mark class="yes">' . esc_html( $mysql_version ) . '</mark>';
276
+						echo '<mark class="yes">'.esc_html($mysql_version).'</mark>';
277 277
 					}
278 278
 					?>
279 279
 				</td>
280 280
 			</tr>
281 281
 		<?php endif; ?>
282 282
 		<tr>
283
-			<td data-export-label="Default Timezone is UTC"><?php _e( 'Default Timezone is UTC', 'give' ); ?>:</td>
284
-			<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>
283
+			<td data-export-label="Default Timezone is UTC"><?php _e('Default Timezone is UTC', 'give'); ?>:</td>
284
+			<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>
285 285
 			<td><?php
286 286
 				$default_timezone = date_default_timezone_get();
287
-				if ( 'UTC' !== $default_timezone ) {
288
-					echo '<mark class="error"><span class="dashicons dashicons-warning"></span> ' . sprintf( __( 'Default timezone is %s - it should be UTC', 'give' ), $default_timezone ) . '</mark>';
287
+				if ('UTC' !== $default_timezone) {
288
+					echo '<mark class="error"><span class="dashicons dashicons-warning"></span> '.sprintf(__('Default timezone is %s - it should be UTC', 'give'), $default_timezone).'</mark>';
289 289
 				} else {
290 290
 					echo '<mark class="yes"><span class="dashicons dashicons-yes"></span></mark>';
291 291
 				} ?>
@@ -296,118 +296,118 @@  discard block
 block discarded – undo
296 296
 
297 297
 		// fsockopen/cURL.
298 298
 		$posting['fsockopen_curl']['name'] = 'fsockopen/cURL';
299
-		$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' );
299
+		$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');
300 300
 
301
-		if ( function_exists( 'fsockopen' ) || function_exists( 'curl_init' ) ) {
301
+		if (function_exists('fsockopen') || function_exists('curl_init')) {
302 302
 			$posting['fsockopen_curl']['success'] = true;
303 303
 		} else {
304 304
 			$posting['fsockopen_curl']['success'] = false;
305
-			$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' );
305
+			$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');
306 306
 		}
307 307
 
308 308
 		// SOAP.
309 309
 		$posting['soap_client']['name'] = 'SoapClient';
310
-		$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' );
310
+		$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');
311 311
 
312
-		if ( class_exists( 'SoapClient' ) ) {
312
+		if (class_exists('SoapClient')) {
313 313
 			$posting['soap_client']['success'] = true;
314 314
 		} else {
315 315
 			$posting['soap_client']['success'] = false;
316
-			$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>' );
316
+			$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>');
317 317
 		}
318 318
 
319 319
 		// DOMDocument.
320 320
 		$posting['dom_document']['name'] = 'DOMDocument';
321
-		$posting['dom_document']['help'] = __( 'HTML/Multipart emails use DOMDocument to generate inline CSS in templates.', 'give' );
321
+		$posting['dom_document']['help'] = __('HTML/Multipart emails use DOMDocument to generate inline CSS in templates.', 'give');
322 322
 
323
-		if ( class_exists( 'DOMDocument' ) ) {
323
+		if (class_exists('DOMDocument')) {
324 324
 			$posting['dom_document']['success'] = true;
325 325
 		} else {
326 326
 			$posting['dom_document']['success'] = false;
327
-			$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>' );
327
+			$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>');
328 328
 		}
329 329
 
330 330
 		// gzip.
331 331
 		$posting['gzip']['name'] = 'gzip';
332
-		$posting['gzip']['help'] = __( 'gzip is used for file compression and decompression.', 'give' );
332
+		$posting['gzip']['help'] = __('gzip is used for file compression and decompression.', 'give');
333 333
 
334
-		if ( is_callable( 'gzopen' ) ) {
334
+		if (is_callable('gzopen')) {
335 335
 			$posting['gzip']['success'] = true;
336 336
 		} else {
337 337
 			$posting['gzip']['success'] = false;
338
-			$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>' );
338
+			$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>');
339 339
 		}
340 340
 
341 341
 		// GD Graphics Library.
342 342
 		$posting['gd']['name'] = 'GD Graphics Library';
343
-		$posting['gd']['help'] = __( 'GD Graphics Library is used for dynamically manipulating images.', 'give' );
344
-		$posting['gd']['success'] = extension_loaded( 'gd' ) && function_exists( 'gd_info' ) ? true : false;
343
+		$posting['gd']['help'] = __('GD Graphics Library is used for dynamically manipulating images.', 'give');
344
+		$posting['gd']['success'] = extension_loaded('gd') && function_exists('gd_info') ? true : false;
345 345
 
346 346
 		// Multibyte String.
347 347
 		$posting['mbstring']['name'] = 'Multibyte String';
348
-		$posting['mbstring']['help'] = __( 'Multibyte String (mbstring) is used to convert character encoding, like for emails or converting characters to lowercase.', 'give' );
348
+		$posting['mbstring']['help'] = __('Multibyte String (mbstring) is used to convert character encoding, like for emails or converting characters to lowercase.', 'give');
349 349
 
350
-		if ( extension_loaded( 'mbstring' ) ) {
350
+		if (extension_loaded('mbstring')) {
351 351
 			$posting['mbstring']['success'] = true;
352 352
 		} else {
353 353
 			$posting['mbstring']['success'] = false;
354
-			$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>' );
354
+			$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>');
355 355
 		}
356 356
 
357 357
 		// WP Remote Post Check.
358
-		$posting['wp_remote_post']['name'] = __( 'Remote Post', 'give');
359
-		$posting['wp_remote_post']['help'] = __( 'PayPal uses this method of communicating when sending back transaction information.', 'give' );
358
+		$posting['wp_remote_post']['name'] = __('Remote Post', 'give');
359
+		$posting['wp_remote_post']['help'] = __('PayPal uses this method of communicating when sending back transaction information.', 'give');
360 360
 
361
-		$response = wp_safe_remote_post( 'https://www.paypal.com/cgi-bin/webscr', array(
361
+		$response = wp_safe_remote_post('https://www.paypal.com/cgi-bin/webscr', array(
362 362
 			'timeout'     => 60,
363
-			'user-agent'  => 'Give/' . GIVE_VERSION,
363
+			'user-agent'  => 'Give/'.GIVE_VERSION,
364 364
 			'httpversion' => '1.1',
365 365
 			'body'        => array(
366 366
 				'cmd'     => '_notify-validate'
367 367
 			)
368
-		) );
368
+		));
369 369
 
370
-		if ( ! is_wp_error( $response ) && $response['response']['code'] >= 200 && $response['response']['code'] < 300 ) {
370
+		if ( ! is_wp_error($response) && $response['response']['code'] >= 200 && $response['response']['code'] < 300) {
371 371
 			$posting['wp_remote_post']['success'] = true;
372 372
 		} else {
373
-			$posting['wp_remote_post']['note']    = __( 'wp_remote_post() failed. PayPal IPN won\'t work with your server. Contact your hosting provider.', 'give' );
374
-			if ( is_wp_error( $response ) ) {
375
-				$posting['wp_remote_post']['note'] .= ' ' . sprintf( __( 'Error: %s', 'give' ), sanitize_text_field( $response->get_error_message() ) );
373
+			$posting['wp_remote_post']['note']    = __('wp_remote_post() failed. PayPal IPN won\'t work with your server. Contact your hosting provider.', 'give');
374
+			if (is_wp_error($response)) {
375
+				$posting['wp_remote_post']['note'] .= ' '.sprintf(__('Error: %s', 'give'), sanitize_text_field($response->get_error_message()));
376 376
 			} else {
377
-				$posting['wp_remote_post']['note'] .= ' ' . sprintf( __( 'Status code: %s', 'give' ), sanitize_text_field( $response['response']['code'] ) );
377
+				$posting['wp_remote_post']['note'] .= ' '.sprintf(__('Status code: %s', 'give'), sanitize_text_field($response['response']['code']));
378 378
 			}
379 379
 			$posting['wp_remote_post']['success'] = false;
380 380
 		}
381 381
 
382 382
 		// WP Remote Get Check.
383
-		$posting['wp_remote_get']['name'] = __( 'Remote Get', 'give');
384
-		$posting['wp_remote_get']['help'] = __( 'Give plugins may use this method of communication when checking for plugin updates.', 'give' );
383
+		$posting['wp_remote_get']['name'] = __('Remote Get', 'give');
384
+		$posting['wp_remote_get']['help'] = __('Give plugins may use this method of communication when checking for plugin updates.', 'give');
385 385
 
386
-		$response = wp_safe_remote_get( 'https://woocommerce.com/wc-api/product-key-api?request=ping&network=' . ( is_multisite() ? '1' : '0' ) );
386
+		$response = wp_safe_remote_get('https://woocommerce.com/wc-api/product-key-api?request=ping&network='.(is_multisite() ? '1' : '0'));
387 387
 
388
-		if ( ! is_wp_error( $response ) && $response['response']['code'] >= 200 && $response['response']['code'] < 300 ) {
388
+		if ( ! is_wp_error($response) && $response['response']['code'] >= 200 && $response['response']['code'] < 300) {
389 389
 			$posting['wp_remote_get']['success'] = true;
390 390
 		} else {
391
-			$posting['wp_remote_get']['note']    = __( 'wp_remote_get() failed. The Give plugin updater won\'t work with your server. Contact your hosting provider.', 'give' );
392
-			if ( is_wp_error( $response ) ) {
393
-				$posting['wp_remote_get']['note'] .= ' ' . sprintf( __( 'Error: %s', 'give' ), give_clean( $response->get_error_message() ) );
391
+			$posting['wp_remote_get']['note']    = __('wp_remote_get() failed. The Give plugin updater won\'t work with your server. Contact your hosting provider.', 'give');
392
+			if (is_wp_error($response)) {
393
+				$posting['wp_remote_get']['note'] .= ' '.sprintf(__('Error: %s', 'give'), give_clean($response->get_error_message()));
394 394
 			} else {
395
-				$posting['wp_remote_get']['note'] .= ' ' . sprintf( __( 'Status code: %s', 'give' ), give_clean( $response['response']['code'] ) );
395
+				$posting['wp_remote_get']['note'] .= ' '.sprintf(__('Status code: %s', 'give'), give_clean($response['response']['code']));
396 396
 			}
397 397
 			$posting['wp_remote_get']['success'] = false;
398 398
 		}
399 399
 
400
-		$posting = apply_filters( 'give_debug_posting', $posting );
400
+		$posting = apply_filters('give_debug_posting', $posting);
401 401
 
402
-		foreach ( $posting as $post ) {
403
-			$mark = ! empty( $post['success'] ) ? 'yes' : 'error';
402
+		foreach ($posting as $post) {
403
+			$mark = ! empty($post['success']) ? 'yes' : 'error';
404 404
 			?>
405 405
 			<tr>
406
-				<td data-export-label="<?php echo esc_html( $post['name'] ); ?>"><?php echo esc_html( $post['name'] ); ?>:</td>
407
-				<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>
406
+				<td data-export-label="<?php echo esc_html($post['name']); ?>"><?php echo esc_html($post['name']); ?>:</td>
407
+				<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>
408 408
 				<td>
409 409
 					<mark class="<?php echo $mark; ?>">
410
-						<?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'] ) : ''; ?>
410
+						<?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']) : ''; ?>
411 411
 					</mark>
412 412
 				</td>
413 413
 			</tr>
@@ -420,122 +420,122 @@  discard block
 block discarded – undo
420 420
 <table class="give-status-table widefat" cellspacing="0">
421 421
 	<thead>
422 422
 		<tr>
423
-			<th colspan="3" data-export-label="Give Configuration"><h2><?php _e( 'Give Configuration', 'give' ); ?></h2></th>
423
+			<th colspan="3" data-export-label="Give Configuration"><h2><?php _e('Give Configuration', 'give'); ?></h2></th>
424 424
 		</tr>
425 425
 	</thead>
426 426
 	<tbody>
427 427
 		<tr>
428
-			<td data-export-label="Give Version"><?php _e( 'Give Version', 'give' ); ?>:</td>
429
-			<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>
430
-			<td><?php echo esc_html( GIVE_VERSION ); ?></td>
428
+			<td data-export-label="Give Version"><?php _e('Give Version', 'give'); ?>:</td>
429
+			<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>
430
+			<td><?php echo esc_html(GIVE_VERSION); ?></td>
431 431
 		</tr>
432 432
 		<tr>
433
-			<td data-export-label="Upgraded From"><?php _e( 'Upgraded From', 'give' ); ?>:</td>
434
-			<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>
435
-			<td><?php echo esc_html( get_option( 'give_version_upgraded_from', '&ndash;' ) ); ?></td>
433
+			<td data-export-label="Upgraded From"><?php _e('Upgraded From', 'give'); ?>:</td>
434
+			<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>
435
+			<td><?php echo esc_html(get_option('give_version_upgraded_from', '&ndash;')); ?></td>
436 436
 		</tr>
437 437
 		<tr>
438
-			<td data-export-label="Test Mode"><?php _e( 'Test Mode', 'give' ); ?>:</td>
439
-			<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>
440
-			<td><?php echo give_is_test_mode() ? __( 'Enabled', 'give' ) : __( 'Disabled', 'give' ); ?></td>
438
+			<td data-export-label="Test Mode"><?php _e('Test Mode', 'give'); ?>:</td>
439
+			<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>
440
+			<td><?php echo give_is_test_mode() ? __('Enabled', 'give') : __('Disabled', 'give'); ?></td>
441 441
 		</tr>
442 442
 		<tr>
443
-			<td data-export-label="Currency Code"><?php _e( 'Currency Code', 'give' ); ?>:</td>
444
-			<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>
445
-			<td><?php echo esc_html( give_get_currency() ); ?></td>
443
+			<td data-export-label="Currency Code"><?php _e('Currency Code', 'give'); ?>:</td>
444
+			<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>
445
+			<td><?php echo esc_html(give_get_currency()); ?></td>
446 446
 		</tr>
447 447
 		<tr>
448
-			<td data-export-label="Currency Position"><?php _e( 'Currency Position', 'give' ); ?>:</td>
449
-			<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>
450
-			<td><?php echo 'before' === give_get_option( 'currency_position' ) ? __( 'Before', 'give' ) : __( 'After', 'give' ); ?></td>
448
+			<td data-export-label="Currency Position"><?php _e('Currency Position', 'give'); ?>:</td>
449
+			<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>
450
+			<td><?php echo 'before' === give_get_option('currency_position') ? __('Before', 'give') : __('After', 'give'); ?></td>
451 451
 		</tr>
452 452
 		<tr>
453
-			<td data-export-label="Decimal Separator"><?php _e( 'Decimal Separator', 'give' ); ?>:</td>
454
-			<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>
455
-			<td><?php echo esc_html( give_get_price_decimal_separator() ); ?></td>
453
+			<td data-export-label="Decimal Separator"><?php _e('Decimal Separator', 'give'); ?>:</td>
454
+			<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>
455
+			<td><?php echo esc_html(give_get_price_decimal_separator()); ?></td>
456 456
 		</tr>
457 457
 		<tr>
458
-			<td data-export-label="Thousands Separator"><?php _e( 'Thousands Separator', 'give' ); ?>:</td>
459
-			<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>
460
-			<td><?php echo esc_html( give_get_price_thousand_separator() ); ?></td>
458
+			<td data-export-label="Thousands Separator"><?php _e('Thousands Separator', 'give'); ?>:</td>
459
+			<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>
460
+			<td><?php echo esc_html(give_get_price_thousand_separator()); ?></td>
461 461
 		</tr>
462 462
 		<tr>
463
-			<td data-export-label="Success Page"><?php _e( 'Success Page', 'give' ); ?>:</td>
464
-			<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>
465
-			<td><?php echo ! empty( $give_options['success_page'] ) ? esc_url( get_permalink( $give_options['success_page'] ) ) : '&ndash;'; ?></td>
463
+			<td data-export-label="Success Page"><?php _e('Success Page', 'give'); ?>:</td>
464
+			<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>
465
+			<td><?php echo ! empty($give_options['success_page']) ? esc_url(get_permalink($give_options['success_page'])) : '&ndash;'; ?></td>
466 466
 		</tr>
467 467
 		<tr>
468
-			<td data-export-label="Failure Page"><?php _e( 'Failure Page', 'give' ); ?>:</td>
469
-			<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>
470
-			<td><?php echo ! empty( $give_options['failure_page'] ) ? esc_url( get_permalink( $give_options['failure_page'] ) ) : '&ndash;'; ?></td>
468
+			<td data-export-label="Failure Page"><?php _e('Failure Page', 'give'); ?>:</td>
469
+			<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>
470
+			<td><?php echo ! empty($give_options['failure_page']) ? esc_url(get_permalink($give_options['failure_page'])) : '&ndash;'; ?></td>
471 471
 		</tr>
472 472
 		<tr>
473
-			<td data-export-label="Donation History Page"><?php _e( 'Donation History Page', 'give' ); ?>:</td>
474
-			<td class="help"><span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php echo esc_attr( __( 'The page where past donations are listed.', 'give' ) ); ?>"></span></td>
475
-			<td><?php echo ! empty( $give_options['history_page'] ) ? esc_url( get_permalink( $give_options['history_page'] ) ) : '&ndash;'; ?></td>
473
+			<td data-export-label="Donation History Page"><?php _e('Donation History Page', 'give'); ?>:</td>
474
+			<td class="help"><span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php echo esc_attr(__('The page where past donations are listed.', 'give')); ?>"></span></td>
475
+			<td><?php echo ! empty($give_options['history_page']) ? esc_url(get_permalink($give_options['history_page'])) : '&ndash;'; ?></td>
476 476
 		</tr>
477 477
 		<tr>
478
-			<td data-export-label="Give Forms Slug"><?php _e( 'Give Forms Slug', 'give' ); ?>:</td>
479
-			<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>
480
-			<td><?php echo esc_html( defined( 'GIVE_SLUG' ) ? '/' . GIVE_SLUG . '/' : '/donations/' ); ?></td>
478
+			<td data-export-label="Give Forms Slug"><?php _e('Give Forms Slug', 'give'); ?>:</td>
479
+			<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>
480
+			<td><?php echo esc_html(defined('GIVE_SLUG') ? '/'.GIVE_SLUG.'/' : '/donations/'); ?></td>
481 481
 		</tr>
482 482
 		<?php
483 483
 		$active_gateways = give_get_enabled_payment_gateways();
484 484
 		$enabled_gateways = $default_gateway = '';
485 485
 
486
-		if ( $active_gateways ) {
487
-			$default_gateway_is_active = give_is_gateway_active( give_get_default_gateway( null ) );
486
+		if ($active_gateways) {
487
+			$default_gateway_is_active = give_is_gateway_active(give_get_default_gateway(null));
488 488
 
489
-			if ( $default_gateway_is_active ) {
490
-				$default_gateway = give_get_default_gateway( null );
491
-				$default_gateway = $active_gateways[ $default_gateway ]['admin_label'];
489
+			if ($default_gateway_is_active) {
490
+				$default_gateway = give_get_default_gateway(null);
491
+				$default_gateway = $active_gateways[$default_gateway]['admin_label'];
492 492
 			} else {
493
-				$default_gateway = __( 'Test Donation', 'give' );
493
+				$default_gateway = __('Test Donation', 'give');
494 494
 			}
495 495
 
496 496
 			$gateways = array();
497 497
 
498
-			foreach ( $active_gateways as $gateway ) {
498
+			foreach ($active_gateways as $gateway) {
499 499
 				$gateways[] = $gateway['admin_label'];
500 500
 			}
501 501
 
502
-			$enabled_gateways = implode( ', ', $gateways );
502
+			$enabled_gateways = implode(', ', $gateways);
503 503
 		}
504 504
 		?>
505 505
 		<tr>
506
-			<td data-export-label="Enabled Payment Gateways"><?php _e( 'Enabled Payment Gateways', 'give' ); ?>:</td>
507
-			<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>
508
-			<td><?php echo esc_html( ! empty( $enabled_gateways ) ? $enabled_gateways : '&ndash;' ); ?></td>
506
+			<td data-export-label="Enabled Payment Gateways"><?php _e('Enabled Payment Gateways', 'give'); ?>:</td>
507
+			<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>
508
+			<td><?php echo esc_html( ! empty($enabled_gateways) ? $enabled_gateways : '&ndash;'); ?></td>
509 509
 		</tr>
510 510
 		<tr>
511
-			<td data-export-label="Default Payment Gateway"><?php _e( 'Default Payment Gateway', 'give' ); ?>:</td>
512
-			<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>
513
-			<td><?php echo esc_html( ! empty( $default_gateway ) ? $default_gateway : '&ndash;' ); ?></td>
511
+			<td data-export-label="Default Payment Gateway"><?php _e('Default Payment Gateway', 'give'); ?>:</td>
512
+			<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>
513
+			<td><?php echo esc_html( ! empty($default_gateway) ? $default_gateway : '&ndash;'); ?></td>
514 514
 		</tr>
515 515
 		<tr>
516
-			<td data-export-label="PayPal IPN Verification"><?php _e( 'PayPal IPN Verification', 'give' ); ?>:</td>
517
-			<td class="help"><span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php echo esc_attr( __( 'Whether admins requires verification of IPN notifications with PayPal.', 'give' ) ); ?>"></span></td>
518
-			<td><?php echo 'enabled' === give_get_option( 'paypal_verification' ) ? __( 'Enabled', 'give' ) : __( 'Disabled', 'give' ); ?></td>
516
+			<td data-export-label="PayPal IPN Verification"><?php _e('PayPal IPN Verification', 'give'); ?>:</td>
517
+			<td class="help"><span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php echo esc_attr(__('Whether admins requires verification of IPN notifications with PayPal.', 'give')); ?>"></span></td>
518
+			<td><?php echo 'enabled' === give_get_option('paypal_verification') ? __('Enabled', 'give') : __('Disabled', 'give'); ?></td>
519 519
 		</tr>
520 520
 		<tr>
521
-			<td data-export-label="PayPal IPN Notifications"><?php _e( 'PayPal IPN Notifications', 'give' ); ?>:</td>
522
-			<td class="help"><span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php echo esc_attr( __( 'Displays whether when last PayPal IPN is received with which donation or transaction.', 'give' ) ); ?>"></span></td>
521
+			<td data-export-label="PayPal IPN Notifications"><?php _e('PayPal IPN Notifications', 'give'); ?>:</td>
522
+			<td class="help"><span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php echo esc_attr(__('Displays whether when last PayPal IPN is received with which donation or transaction.', 'give')); ?>"></span></td>
523 523
 			<td>
524 524
 				<?php
525
-				$last_paypal_ipn_received = get_option( 'give_last_paypal_ipn_received' );
526
-				if( is_array( $last_paypal_ipn_received ) && count( $last_paypal_ipn_received ) > 0 ) {
525
+				$last_paypal_ipn_received = get_option('give_last_paypal_ipn_received');
526
+				if (is_array($last_paypal_ipn_received) && count($last_paypal_ipn_received) > 0) {
527 527
 					$donation_id     = $last_paypal_ipn_received['payment_id'];
528
-					$ipn_timestamp   = give_get_meta( $donation_id, 'give_last_paypal_ipn_received', true );
529
-					$transaction_url = 'https://history.paypal.com/cgi-bin/webscr?cmd=_history-details-from-hub&id=' . $last_paypal_ipn_received['transaction_id'];
530
-					$donation_url    = site_url() . '/wp-admin/edit.php?post_type=give_forms&page=give-payment-history&view=view-payment-details&id=' . $donation_id;
528
+					$ipn_timestamp   = give_get_meta($donation_id, 'give_last_paypal_ipn_received', true);
529
+					$transaction_url = 'https://history.paypal.com/cgi-bin/webscr?cmd=_history-details-from-hub&id='.$last_paypal_ipn_received['transaction_id'];
530
+					$donation_url    = site_url().'/wp-admin/edit.php?post_type=give_forms&page=give-payment-history&view=view-payment-details&id='.$donation_id;
531 531
 					echo sprintf(
532
-							__( 'IPN received for <a href="%s">#%s</a> ( <a href="%s" target="_blank">%s</a> ) on %s at %s. Status %s', 'give' ),
532
+							__('IPN received for <a href="%s">#%s</a> ( <a href="%s" target="_blank">%s</a> ) on %s at %s. Status %s', 'give'),
533 533
 							$donation_url,
534 534
 							$donation_id,
535 535
 							$transaction_url,
536 536
 							$last_paypal_ipn_received['transaction_id'],
537
-							date_i18n( 'm/d/Y', $ipn_timestamp ),
538
-							date_i18n( 'H:i', $ipn_timestamp ),
537
+							date_i18n('m/d/Y', $ipn_timestamp),
538
+							date_i18n('H:i', $ipn_timestamp),
539 539
 							$last_paypal_ipn_received['auth_status']
540 540
 					);
541 541
 				} else {
@@ -545,14 +545,14 @@  discard block
 block discarded – undo
545 545
 			</td>
546 546
 		</tr>
547 547
 		<tr>
548
-			<td data-export-label="Admin Email Notifications"><?php _e( 'Admin Email Notifications', 'give' ); ?>:</td>
549
-			<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>
550
-			<td><?php echo 'enabled' === give_get_option( 'admin_notices' ) ? __( 'Enabled', 'give' ) : __( 'Disabled', 'give' ); ?></td>
548
+			<td data-export-label="Admin Email Notifications"><?php _e('Admin Email Notifications', 'give'); ?>:</td>
549
+			<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>
550
+			<td><?php echo 'enabled' === give_get_option('admin_notices') ? __('Enabled', 'give') : __('Disabled', 'give'); ?></td>
551 551
 		</tr>
552 552
 		<tr>
553
-			<td data-export-label="Donor Email Access"><?php _e( 'Donor Email Access', 'give' ); ?>:</td>
554
-			<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>
555
-			<td><?php echo 'enabled' === give_get_option( 'email_access' ) ? __( 'Enabled', 'give' ) : __( 'Disabled', 'give' ); ?></td>
553
+			<td data-export-label="Donor Email Access"><?php _e('Donor Email Access', 'give'); ?>:</td>
554
+			<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>
555
+			<td><?php echo 'enabled' === give_get_option('email_access') ? __('Enabled', 'give') : __('Disabled', 'give'); ?></td>
556 556
 		</tr>
557 557
 	</tbody>
558 558
 </table>
@@ -560,45 +560,45 @@  discard block
 block discarded – undo
560 560
 <table class="give-status-table widefat" cellspacing="0">
561 561
 	<thead>
562 562
 		<tr>
563
-			<th colspan="3" data-export-label="Session Configuration"><h2><?php _e( 'Session Configuration', 'give' ); ?></h2></th>
563
+			<th colspan="3" data-export-label="Session Configuration"><h2><?php _e('Session Configuration', 'give'); ?></h2></th>
564 564
 		</tr>
565 565
 	</thead>
566 566
 	<tbody>
567 567
 		<tr>
568
-			<td data-export-label="Give Use Sessions"><?php _e( 'Give Use Sessions', 'give' ); ?>:</td>
569
-			<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>
570
-			<td><?php echo defined( 'GIVE_USE_PHP_SESSIONS' ) && GIVE_USE_PHP_SESSIONS ? __( 'Enforced', 'give' ) : ( Give()->session->use_php_sessions() ? __( 'Enabled', 'give' ) : __( 'Disabled', 'give' ) ); ?></td>
568
+			<td data-export-label="Give Use Sessions"><?php _e('Give Use Sessions', 'give'); ?>:</td>
569
+			<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>
570
+			<td><?php echo defined('GIVE_USE_PHP_SESSIONS') && GIVE_USE_PHP_SESSIONS ? __('Enforced', 'give') : (Give()->session->use_php_sessions() ? __('Enabled', 'give') : __('Disabled', 'give')); ?></td>
571 571
 		</tr>
572 572
 		<tr>
573
-			<td data-export-label="Session"><?php _e( 'Session', 'give' ); ?>:</td>
574
-			<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>
575
-			<td><?php echo isset( $_SESSION ) ? __( 'Enabled', 'give' ) : __( 'Disabled', 'give' ); ?></td>
573
+			<td data-export-label="Session"><?php _e('Session', 'give'); ?>:</td>
574
+			<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>
575
+			<td><?php echo isset($_SESSION) ? __('Enabled', 'give') : __('Disabled', 'give'); ?></td>
576 576
 		</tr>
577
-		<?php if ( isset( $_SESSION ) ) { ?>
577
+		<?php if (isset($_SESSION)) { ?>
578 578
 			<tr>
579
-				<td data-export-label="Session Name"><?php _e( 'Session Name', 'give' ); ?>:</td>
580
-				<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>
581
-				<td><?php echo esc_html( ini_get( 'session.name' ) ); ?></td>
579
+				<td data-export-label="Session Name"><?php _e('Session Name', 'give'); ?>:</td>
580
+				<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>
581
+				<td><?php echo esc_html(ini_get('session.name')); ?></td>
582 582
 			</tr>
583 583
 			<tr>
584
-				<td data-export-label="Cookie Path"><?php _e( 'Cookie Path', 'give' ); ?>:</td>
585
-				<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>
586
-				<td><?php echo esc_html( ini_get( 'session.cookie_path' ) ); ?></td>
584
+				<td data-export-label="Cookie Path"><?php _e('Cookie Path', 'give'); ?>:</td>
585
+				<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>
586
+				<td><?php echo esc_html(ini_get('session.cookie_path')); ?></td>
587 587
 			</tr>
588 588
 			<tr>
589
-				<td data-export-label="Save Path"><?php _e( 'Save Path', 'give' ); ?>:</td>
590
-				<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>
591
-				<td><?php echo esc_html( ini_get( 'session.save_path' ) ); ?></td>
589
+				<td data-export-label="Save Path"><?php _e('Save Path', 'give'); ?>:</td>
590
+				<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>
591
+				<td><?php echo esc_html(ini_get('session.save_path')); ?></td>
592 592
 			</tr>
593 593
 			<tr>
594
-				<td data-export-label="Use Cookies"><?php _e( 'Use Cookies', 'give' ); ?>:</td>
595
-				<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>
596
-				<td><?php echo ini_get( 'session.use_cookies' ) ? __( 'Enabled', 'give' ) : __( 'Disabled', 'give' ); ?></td>
594
+				<td data-export-label="Use Cookies"><?php _e('Use Cookies', 'give'); ?>:</td>
595
+				<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>
596
+				<td><?php echo ini_get('session.use_cookies') ? __('Enabled', 'give') : __('Disabled', 'give'); ?></td>
597 597
 			</tr>
598 598
 			<tr>
599
-				<td data-export-label="Use Only Cookies"><?php _e( 'Use Only Cookies', 'give' ); ?>:</td>
600
-				<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>
601
-				<td><?php echo ini_get( 'session.use_only_cookies' ) ? __( 'Enabled', 'give' ) : __( 'Disabled', 'give' ); ?></td>
599
+				<td data-export-label="Use Only Cookies"><?php _e('Use Only Cookies', 'give'); ?>:</td>
600
+				<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>
601
+				<td><?php echo ini_get('session.use_only_cookies') ? __('Enabled', 'give') : __('Disabled', 'give'); ?></td>
602 602
 			</tr>
603 603
 		<?php } ?>
604 604
 	</tbody>
@@ -607,13 +607,13 @@  discard block
 block discarded – undo
607 607
 <table class="give-status-table widefat" cellspacing="0">
608 608
 	<thead>
609 609
 	<tr>
610
-		<th colspan="3" data-export-label="Active Give Add-ons"><h2><?php _e( 'Active Give Add-ons', 'give' ); ?></h2></th>
610
+		<th colspan="3" data-export-label="Active Give Add-ons"><h2><?php _e('Active Give Add-ons', 'give'); ?></h2></th>
611 611
 	</tr>
612 612
 	</thead>
613 613
 	<tbody>
614 614
 		<?php
615
-		foreach ( $plugins as $plugin_data ) {
616
-			if ( 'active' != $plugin_data['Status'] ||  'add-on' != $plugin_data['Type'] ) {
615
+		foreach ($plugins as $plugin_data) {
616
+			if ('active' != $plugin_data['Status'] || 'add-on' != $plugin_data['Type']) {
617 617
 				continue;
618 618
 			}
619 619
 
@@ -621,30 +621,30 @@  discard block
 block discarded – undo
621 621
 			$author_name = $plugin_data['Author'];
622 622
 
623 623
 			// Link the plugin name to the plugin URL if available.
624
-			if ( ! empty( $plugin_data['PluginURI'] ) ) {
625
-				$plugin_name = '<a href="' . esc_url( $plugin_data['PluginURI'] ) . '" title="' . esc_attr__( 'Visit plugin homepage' , 'give' ) . '">' . $plugin_name . '</a>';
624
+			if ( ! empty($plugin_data['PluginURI'])) {
625
+				$plugin_name = '<a href="'.esc_url($plugin_data['PluginURI']).'" title="'.esc_attr__('Visit plugin homepage', 'give').'">'.$plugin_name.'</a>';
626 626
 			}
627 627
 
628 628
 			// Link the author name to the author URL if available.
629
-			if ( ! empty( $plugin_data['AuthorURI'] ) ) {
630
-				$author_name = '<a href="' . esc_url( $plugin_data['AuthorURI'] ) . '" title="' . esc_attr__( 'Visit author homepage' , 'give' ) . '">' . $author_name . '</a>';
629
+			if ( ! empty($plugin_data['AuthorURI'])) {
630
+				$author_name = '<a href="'.esc_url($plugin_data['AuthorURI']).'" title="'.esc_attr__('Visit author homepage', 'give').'">'.$author_name.'</a>';
631 631
 			}
632 632
 			?>
633 633
 			<tr>
634
-				<td><?php echo wp_kses( $plugin_name, wp_kses_allowed_html( 'post' ) ); ?></td>
634
+				<td><?php echo wp_kses($plugin_name, wp_kses_allowed_html('post')); ?></td>
635 635
 				<td class="help">&nbsp;</td>
636 636
 				<td>
637 637
 					<?php
638
-					if ( true === $plugin_data['License'] ) {
639
-						echo '<mark class="yes"><span class="dashicons dashicons-yes"></span></mark> ' . __( 'Licensed', 'give' );
638
+					if (true === $plugin_data['License']) {
639
+						echo '<mark class="yes"><span class="dashicons dashicons-yes"></span></mark> '.__('Licensed', 'give');
640 640
 					} else {
641
-						echo '<mark class="error"><span class="dashicons dashicons-no-alt"></span></mark> ' . __( 'Unlicensed', 'give' );
641
+						echo '<mark class="error"><span class="dashicons dashicons-no-alt"></span></mark> '.__('Unlicensed', 'give');
642 642
 					}
643 643
 
644 644
 					echo ' &ndash; '
645
-					     . sprintf( _x( 'by %s', 'by author', 'give' ), wp_kses( $author_name, wp_kses_allowed_html( 'post' ) ) )
645
+					     . sprintf(_x('by %s', 'by author', 'give'), wp_kses($author_name, wp_kses_allowed_html('post')))
646 646
 					     . ' &ndash; '
647
-					     . esc_html( $plugin_data['Version'] );
647
+					     . esc_html($plugin_data['Version']);
648 648
 					?>
649 649
 				</td>
650 650
 			</tr>
@@ -657,18 +657,18 @@  discard block
 block discarded – undo
657 657
 <table class="give-status-table widefat" cellspacing="0">
658 658
 	<thead>
659 659
 		<tr>
660
-			<th colspan="3" data-export-label="Other Active Plugins"><h2><?php _e( 'Other Active Plugins', 'give' ); ?></h2></th>
660
+			<th colspan="3" data-export-label="Other Active Plugins"><h2><?php _e('Other Active Plugins', 'give'); ?></h2></th>
661 661
 		</tr>
662 662
 	</thead>
663 663
 	<tbody>
664 664
 		<?php
665
-		foreach ( $plugins as $plugin_data ) {
666
-			if ( 'active' != $plugin_data['Status'] ||  'other' != $plugin_data['Type'] ) {
665
+		foreach ($plugins as $plugin_data) {
666
+			if ('active' != $plugin_data['Status'] || 'other' != $plugin_data['Type']) {
667 667
 				continue;
668 668
 			}
669 669
 
670 670
 			// Do not show Give core plugin.
671
-			if ( 'Give - Donation Plugin' === $plugin_data['Name'] ) {
671
+			if ('Give - Donation Plugin' === $plugin_data['Name']) {
672 672
 				continue;
673 673
 			}
674 674
 
@@ -676,19 +676,19 @@  discard block
 block discarded – undo
676 676
 			$author_name = $plugin_data['Author'];
677 677
 
678 678
 			// Link the plugin name to the plugin URL if available.
679
-			if ( ! empty( $plugin_data['PluginURI'] ) ) {
680
-				$plugin_name = '<a href="' . esc_url( $plugin_data['PluginURI'] ) . '" title="' . esc_attr__( 'Visit plugin homepage' , 'give' ) . '">' . $plugin_name . '</a>';
679
+			if ( ! empty($plugin_data['PluginURI'])) {
680
+				$plugin_name = '<a href="'.esc_url($plugin_data['PluginURI']).'" title="'.esc_attr__('Visit plugin homepage', 'give').'">'.$plugin_name.'</a>';
681 681
 			}
682 682
 
683 683
 			// Link the author name to the author URL if available.
684
-			if ( ! empty( $plugin_data['AuthorURI'] ) ) {
685
-				$author_name = '<a href="' . esc_url( $plugin_data['AuthorURI'] ) . '" title="' . esc_attr__( 'Visit author homepage' , 'give' ) . '">' . $author_name . '</a>';
684
+			if ( ! empty($plugin_data['AuthorURI'])) {
685
+				$author_name = '<a href="'.esc_url($plugin_data['AuthorURI']).'" title="'.esc_attr__('Visit author homepage', 'give').'">'.$author_name.'</a>';
686 686
 			}
687 687
 			?>
688 688
 			<tr>
689
-				<td><?php echo wp_kses( $plugin_name, wp_kses_allowed_html( 'post' ) ); ?></td>
689
+				<td><?php echo wp_kses($plugin_name, wp_kses_allowed_html('post')); ?></td>
690 690
 				<td class="help">&nbsp;</td>
691
-				<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>
691
+				<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>
692 692
 			</tr>
693 693
 		<?php
694 694
 		}
@@ -699,13 +699,13 @@  discard block
 block discarded – undo
699 699
 <table class="give-status-table widefat" cellspacing="0">
700 700
 	<thead>
701 701
 		<tr>
702
-			<th colspan="3" data-export-label="Inactive Plugins"><h2><?php _e( 'Inactive Plugins', 'give' ); ?></h2></th>
702
+			<th colspan="3" data-export-label="Inactive Plugins"><h2><?php _e('Inactive Plugins', 'give'); ?></h2></th>
703 703
 		</tr>
704 704
 	</thead>
705 705
 	<tbody>
706 706
 		<?php
707
-		foreach ( $plugins as $plugin_data ) {
708
-			if ( 'inactive' != $plugin_data['Status'] ) {
707
+		foreach ($plugins as $plugin_data) {
708
+			if ('inactive' != $plugin_data['Status']) {
709 709
 				continue;
710 710
 			}
711 711
 
@@ -713,19 +713,19 @@  discard block
 block discarded – undo
713 713
 			$author_name = $plugin_data['Author'];
714 714
 
715 715
 			// Link the plugin name to the plugin URL if available.
716
-			if ( ! empty( $plugin_data['PluginURI'] ) ) {
717
-				$plugin_name = '<a href="' . esc_url( $plugin_data['PluginURI'] ) . '" title="' . esc_attr__( 'Visit plugin homepage' , 'give' ) . '">' . $plugin_name . '</a>';
716
+			if ( ! empty($plugin_data['PluginURI'])) {
717
+				$plugin_name = '<a href="'.esc_url($plugin_data['PluginURI']).'" title="'.esc_attr__('Visit plugin homepage', 'give').'">'.$plugin_name.'</a>';
718 718
 			}
719 719
 
720 720
 			// Link the author name to the author URL if available.
721
-			if ( ! empty( $plugin_data['AuthorURI'] ) ) {
722
-				$author_name = '<a href="' . esc_url( $plugin_data['AuthorURI'] ) . '" title="' . esc_attr__( 'Visit author homepage' , 'give' ) . '">' . $author_name . '</a>';
721
+			if ( ! empty($plugin_data['AuthorURI'])) {
722
+				$author_name = '<a href="'.esc_url($plugin_data['AuthorURI']).'" title="'.esc_attr__('Visit author homepage', 'give').'">'.$author_name.'</a>';
723 723
 			}
724 724
 			?>
725 725
 			<tr>
726
-				<td><?php echo wp_kses( $plugin_name, wp_kses_allowed_html( 'post' ) ); ?></td>
726
+				<td><?php echo wp_kses($plugin_name, wp_kses_allowed_html('post')); ?></td>
727 727
 				<td class="help">&nbsp;</td>
728
-				<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>
728
+				<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>
729 729
 			</tr>
730 730
 			<?php
731 731
 		}
@@ -735,37 +735,37 @@  discard block
 block discarded – undo
735 735
 
736 736
 <?php
737 737
 $active_mu_plugins = (array) get_mu_plugins();
738
-if ( ! empty( $active_mu_plugins ) ) {
738
+if ( ! empty($active_mu_plugins)) {
739 739
 ?>
740 740
 	<table class="give-status-table widefat" cellspacing="0">
741 741
 		<thead>
742 742
 			<tr>
743
-				<th colspan="3" data-export-label="Active MU Plugins"><h2><?php _e( 'Active MU Plugins', 'give' ); ?></h2></th>
743
+				<th colspan="3" data-export-label="Active MU Plugins"><h2><?php _e('Active MU Plugins', 'give'); ?></h2></th>
744 744
 			</tr>
745 745
 		</thead>
746 746
 		<tbody>
747 747
 			<?php
748 748
 
749
-			foreach ( $active_mu_plugins as $mu_plugin_data ) {
750
-				if ( ! empty( $mu_plugin_data['Name'] ) ) {
749
+			foreach ($active_mu_plugins as $mu_plugin_data) {
750
+				if ( ! empty($mu_plugin_data['Name'])) {
751 751
 					// Link the plugin name to the plugin URL if available.
752
-					$plugin_name = esc_html( $mu_plugin_data['Name'] );
752
+					$plugin_name = esc_html($mu_plugin_data['Name']);
753 753
 
754
-					if ( ! empty( $mu_plugin_data['PluginURI'] ) ) {
755
-						$plugin_name = '<a href="' . esc_url( $mu_plugin_data['PluginURI'] ) . '" title="' . esc_attr__( 'Visit plugin homepage' , 'give' ) . '">' . $plugin_name . '</a>';
754
+					if ( ! empty($mu_plugin_data['PluginURI'])) {
755
+						$plugin_name = '<a href="'.esc_url($mu_plugin_data['PluginURI']).'" title="'.esc_attr__('Visit plugin homepage', 'give').'">'.$plugin_name.'</a>';
756 756
 					}
757 757
 
758 758
 					// Link the author name to the author URL if available.
759
-					$author_name = esc_html( $mu_plugin_data['Author'] );
759
+					$author_name = esc_html($mu_plugin_data['Author']);
760 760
 
761
-					if ( ! empty( $mu_plugin_data['AuthorURI'] ) ) {
762
-						$author_name = '<a href="' . esc_url( $mu_plugin_data['AuthorURI'] ) . '">' . $author_name . '</a>';
761
+					if ( ! empty($mu_plugin_data['AuthorURI'])) {
762
+						$author_name = '<a href="'.esc_url($mu_plugin_data['AuthorURI']).'">'.$author_name.'</a>';
763 763
 					}
764 764
 					?>
765 765
 					<tr>
766 766
 						<td><?php echo $plugin_name; ?></td>
767 767
 						<td class="help">&nbsp;</td>
768
-						<td><?php echo sprintf( _x( 'by %s', 'by author', 'give' ), $author_name ) . ' &ndash; ' . esc_html( $mu_plugin_data['Version'] ); ?></td>
768
+						<td><?php echo sprintf(_x('by %s', 'by author', 'give'), $author_name).' &ndash; '.esc_html($mu_plugin_data['Version']); ?></td>
769 769
 					</tr>
770 770
 			<?php
771 771
 				}
@@ -778,53 +778,53 @@  discard block
 block discarded – undo
778 778
 <table class="give-status-table widefat" cellspacing="0">
779 779
 	<thead>
780 780
 		<tr>
781
-			<th colspan="3" data-export-label="Theme"><h2><?php _e( 'Theme', 'give' ); ?></h2></th>
781
+			<th colspan="3" data-export-label="Theme"><h2><?php _e('Theme', 'give'); ?></h2></th>
782 782
 		</tr>
783 783
 	</thead>
784 784
 	<?php
785
-	include_once( ABSPATH . 'wp-admin/includes/theme-install.php' );
785
+	include_once(ABSPATH.'wp-admin/includes/theme-install.php');
786 786
 	$active_theme = wp_get_theme();
787 787
 	?>
788 788
 	<tbody>
789 789
 		<tr>
790
-			<td data-export-label="Name"><?php _e( 'Name', 'give' ); ?>:</td>
791
-			<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>
792
-			<td><?php echo esc_html( $active_theme->Name ); ?></td>
790
+			<td data-export-label="Name"><?php _e('Name', 'give'); ?>:</td>
791
+			<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>
792
+			<td><?php echo esc_html($active_theme->Name); ?></td>
793 793
 		</tr>
794 794
 		<tr>
795
-			<td data-export-label="Version"><?php _e( 'Version', 'give' ); ?>:</td>
796
-			<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>
797
-			<td><?php echo esc_html( $active_theme->Version ); ?></td>
795
+			<td data-export-label="Version"><?php _e('Version', 'give'); ?>:</td>
796
+			<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>
797
+			<td><?php echo esc_html($active_theme->Version); ?></td>
798 798
 		</tr>
799 799
 		<tr>
800
-			<td data-export-label="Author URL"><?php _e( 'Author URL', 'give' ); ?>:</td>
801
-			<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>
800
+			<td data-export-label="Author URL"><?php _e('Author URL', 'give'); ?>:</td>
801
+			<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>
802 802
 			<td><?php echo $active_theme->{'Author URI'}; ?></td>
803 803
 		</tr>
804 804
 		<tr>
805
-			<td data-export-label="Child Theme"><?php _e( 'Child Theme', 'give' ); ?>:</td>
806
-			<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>
805
+			<td data-export-label="Child Theme"><?php _e('Child Theme', 'give'); ?>:</td>
806
+			<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>
807 807
 			<td><?php
808
-				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' );
808
+				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');
809 809
 				?></td>
810 810
 		</tr>
811 811
 		<?php
812
-		if( is_child_theme() ) {
813
-			$parent_theme = wp_get_theme( $active_theme->Template );
812
+		if (is_child_theme()) {
813
+			$parent_theme = wp_get_theme($active_theme->Template);
814 814
 		?>
815 815
 			<tr>
816
-				<td data-export-label="Parent Theme Name"><?php _e( 'Parent Theme Name', 'give' ); ?>:</td>
817
-				<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>
818
-				<td><?php echo esc_html( $parent_theme->Name ); ?></td>
816
+				<td data-export-label="Parent Theme Name"><?php _e('Parent Theme Name', 'give'); ?>:</td>
817
+				<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>
818
+				<td><?php echo esc_html($parent_theme->Name); ?></td>
819 819
 			</tr>
820 820
 			<tr>
821
-				<td data-export-label="Parent Theme Version"><?php _e( 'Parent Theme Version', 'give' ); ?>:</td>
822
-				<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>
823
-				<td><?php echo esc_html( $parent_theme->Version ); ?></td>
821
+				<td data-export-label="Parent Theme Version"><?php _e('Parent Theme Version', 'give'); ?>:</td>
822
+				<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>
823
+				<td><?php echo esc_html($parent_theme->Version); ?></td>
824 824
 			</tr>
825 825
 			<tr>
826
-				<td data-export-label="Parent Theme Author URL"><?php _e( 'Parent Theme Author URL', 'give' ); ?>:</td>
827
-				<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>
826
+				<td data-export-label="Parent Theme Author URL"><?php _e('Parent Theme Author URL', 'give'); ?>:</td>
827
+				<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>
828 828
 				<td><?php echo $parent_theme->{'Author URI'}; ?></td>
829 829
 			</tr>
830 830
 		<?php } ?>
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.