Test Failed
Push — master ( 05ca04...80fd27 )
by Devin
06:50
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   +68 added lines, -68 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',
@@ -289,26 +289,26 @@  discard block
 block discarded – undo
289 289
 			'suppress_filters' => false,
290 290
 		);
291 291
 
292
-		$args    = wp_parse_args( (array) $field['query_args'], $args );
292
+		$args    = wp_parse_args((array) $field['query_args'], $args);
293 293
 
294
-		$posts   = get_posts( $args );
294
+		$posts   = get_posts($args);
295 295
 		$options = array();
296 296
 
297
-		if ( ! empty( $posts ) ) {
298
-			foreach ( $posts as $post ) {
299
-				$options[ absint( $post->ID ) ] = empty( $post->post_title )
300
-					? sprintf( __( 'Untitled (#%s)', 'give' ), $post->ID )
301
-					: apply_filters( 'the_title', $post->post_title );
297
+		if ( ! empty($posts)) {
298
+			foreach ($posts as $post) {
299
+				$options[absint($post->ID)] = empty($post->post_title)
300
+					? sprintf(__('Untitled (#%s)', 'give'), $post->ID)
301
+					: apply_filters('the_title', $post->post_title);
302 302
 			}
303 303
 
304 304
 			$field['type']    = 'listbox';
305 305
 			$field['options'] = $options;
306 306
 
307
-			return $this->generate_listbox( $field );
307
+			return $this->generate_listbox($field);
308 308
 		}
309 309
 
310 310
 		// perform validation here before returning false
311
-		$this->validate( $field );
311
+		$this->validate($field);
312 312
 
313 313
 		return false;
314 314
 	}
@@ -322,9 +322,9 @@  discard block
 block discarded – undo
322 322
 	 *
323 323
 	 * @since 1.0
324 324
 	 */
325
-	protected function generate_textbox( $field ) {
325
+	protected function generate_textbox($field) {
326 326
 
327
-		$textbox = shortcode_atts( array(
327
+		$textbox = shortcode_atts(array(
328 328
 			'label'       => '',
329 329
 			'maxLength'   => '',
330 330
 			'minHeight'   => '',
@@ -336,15 +336,15 @@  discard block
 block discarded – undo
336 336
 			'value'       => '',
337 337
 			'classes'     => '',
338 338
 			'placeholder' => ''
339
-		), $field );
339
+		), $field);
340 340
 
341 341
 		// Remove empty placeholder.
342
-		if( empty( $textbox['placeholder'] ) ) {
343
-			unset( $textbox['placeholder'] );
342
+		if (empty($textbox['placeholder'])) {
343
+			unset($textbox['placeholder']);
344 344
 		}
345 345
 
346
-		if ( $this->validate( $field ) ) {
347
-			return array_filter( $textbox, array( $this, 'return_textbox_value' ) );
346
+		if ($this->validate($field)) {
347
+			return array_filter($textbox, array($this, 'return_textbox_value'));
348 348
 		}
349 349
 
350 350
 		return false;
@@ -357,7 +357,7 @@  discard block
 block discarded – undo
357 357
 	 *
358 358
 	 * @return bool
359 359
 	 */
360
-	function return_textbox_value( $value ) {
360
+	function return_textbox_value($value) {
361 361
 		return $value !== '';
362 362
 	}
363 363
 
@@ -373,9 +373,9 @@  discard block
 block discarded – undo
373 373
 	 *
374 374
 	 * @since 1.0
375 375
 	 */
376
-	protected function validate( $field ) {
376
+	protected function validate($field) {
377 377
 
378
-		extract( shortcode_atts(
378
+		extract(shortcode_atts(
379 379
 				array(
380 380
 					'name'     => false,
381 381
 					'required' => false,
@@ -383,36 +383,36 @@  discard block
 block discarded – undo
383 383
 				), $field )
384 384
 		);
385 385
 
386
-		if ( $name ) {
386
+		if ($name) {
387 387
 
388
-			if ( isset( $required['error'] ) ) {
388
+			if (isset($required['error'])) {
389 389
 
390 390
 				$error = array(
391 391
 					'type' => 'container',
392 392
 					'html' => $required['error'],
393 393
 				);
394 394
 
395
-				$this->errors[ $name ] = $this->generate_container( $error );
395
+				$this->errors[$name] = $this->generate_container($error);
396 396
 			}
397 397
 
398
-			if ( ! ! $required || is_array( $required ) ) {
398
+			if ( ! ! $required || is_array($required)) {
399 399
 
400
-				$alert = esc_html__( 'Some of the shortcode options are required.', 'give' );
400
+				$alert = esc_html__('Some of the shortcode options are required.', 'give');
401 401
 
402
-				if ( isset( $required['alert'] ) ) {
402
+				if (isset($required['alert'])) {
403 403
 
404 404
 					$alert = $required['alert'];
405 405
 
406
-				} else if ( ! empty( $label ) ) {
406
+				} else if ( ! empty($label)) {
407 407
 
408 408
 					$alert = sprintf(
409 409
 					/* translators: %s: option label */
410
-						esc_html__( 'The "%s" option is required.', 'give' ),
411
-						str_replace( ':', '', $label )
410
+						esc_html__('The "%s" option is required.', 'give'),
411
+						str_replace(':', '', $label)
412 412
 					);
413 413
 				}
414 414
 
415
-				$this->required[ $name ] = $alert;
415
+				$this->required[$name] = $alert;
416 416
 			}
417 417
 
418 418
 			return true;
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   +128 added lines, -128 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 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,59 +221,59 @@  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 );
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);
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
 			// Remove section tab conditionally.
273
-			switch ( give_get_current_setting_tab() ) {
273
+			switch (give_get_current_setting_tab()) {
274 274
 				case 'emails':
275 275
 					// unset( $sections['donation-receipt'] );
276
-					unset( $sections['new-donation-notification'] );
276
+					unset($sections['new-donation-notification']);
277 277
 			}
278 278
 
279 279
 			// Output.
@@ -291,23 +291,23 @@  discard block
 block discarded – undo
291 291
 		 *
292 292
 		 * @return array
293 293
 		 */
294
-		function get_filtered_addon_settings( $settings, $setting_fields = array() ) {
294
+		function get_filtered_addon_settings($settings, $setting_fields = array()) {
295 295
 			global $wp_filter;
296 296
 
297 297
 			$new_setting_fields = array();
298 298
 
299
-			if ( ! empty( $settings ) ) {
299
+			if ( ! empty($settings)) {
300 300
 				// Bailout: If setting array contain first element of type title then it means it is already created with new setting api (skip this section ).
301
-				if ( isset( $settings[0]['type'] ) && 'title' == $settings[0]['type'] ) {
301
+				if (isset($settings[0]['type']) && 'title' == $settings[0]['type']) {
302 302
 					$last_sectionend_pos = 0;
303
-					foreach ( $settings as $index => $setting ) {
303
+					foreach ($settings as $index => $setting) {
304 304
 						// We need setting till last section end.
305
-						if ( 'sectionend' === $setting['type'] ) {
305
+						if ('sectionend' === $setting['type']) {
306 306
 							$last_sectionend_pos = ++ $index;
307 307
 						}
308 308
 					}
309 309
 
310
-					$settings = array_slice( $settings, 0, $last_sectionend_pos );
310
+					$settings = array_slice($settings, 0, $last_sectionend_pos);
311 311
 
312 312
 					return $settings;
313 313
 				}
@@ -316,24 +316,24 @@  discard block
 block discarded – undo
316 316
 				$prev_title_field_id = '';
317 317
 
318 318
 				// Create new setting fields.
319
-				foreach ( $settings as $index => $field ) {
319
+				foreach ($settings as $index => $field) {
320 320
 
321 321
 					// Bailout: Must need field type to process.
322
-					if ( ! isset( $field['type'] ) ) {
322
+					if ( ! isset($field['type'])) {
323 323
 						continue;
324 324
 					}
325 325
 
326 326
 					// Set wrapper class if any.
327
-					if ( ! empty( $field['row_classes'] ) ) {
327
+					if ( ! empty($field['row_classes'])) {
328 328
 						$field['wrapper_class'] = $field['row_classes'];
329
-						unset( $field['row_classes'] );
329
+						unset($field['row_classes']);
330 330
 					}
331 331
 
332
-					$field['name'] = ! isset( $field['name'] ) ? '' : $field['name'];
333
-					$field['desc'] = ! isset( $field['desc'] ) ? '' : $field['desc'];
332
+					$field['name'] = ! isset($field['name']) ? '' : $field['name'];
333
+					$field['desc'] = ! isset($field['desc']) ? '' : $field['desc'];
334 334
 
335 335
 					// Modify cmb2 setting fields.
336
-					switch ( $field['type'] ) {
336
+					switch ($field['type']) {
337 337
 						case 'text' :
338 338
 						case 'file' :
339 339
 							$field['css'] = 'width:25em;';
@@ -357,18 +357,18 @@  discard block
 block discarded – undo
357 357
 							$field['type'] = 'title';
358 358
 
359 359
 							// Since we are showing sections, so there now ned to show horizontal rules.
360
-							if ( '<hr>' === $field['desc'] ) {
360
+							if ('<hr>' === $field['desc']) {
361 361
 								$field['desc'] = '';
362 362
 							}
363 363
 
364 364
 							break;
365 365
 					}
366 366
 
367
-					if ( 'title' === $field['type'] ) {
367
+					if ('title' === $field['type']) {
368 368
 
369 369
 						// If we do not have first element as title then these field will be skip from frontend
370 370
 						// because there are not belong to any section, so put all abandon fields under first section.
371
-						if ( $index && empty( $prev_title_field_id ) ) {
371
+						if ($index && empty($prev_title_field_id)) {
372 372
 							array_unshift(
373 373
 								$new_setting_fields,
374 374
 								array(
@@ -382,7 +382,7 @@  discard block
 block discarded – undo
382 382
 							$prev_title_field_id = $field['id'];
383 383
 
384 384
 							continue;
385
-						} elseif ( $index ) {
385
+						} elseif ($index) {
386 386
 							// Section end.
387 387
 							$new_setting_fields[] = array(
388 388
 								'type' => 'sectionend',
@@ -414,52 +414,52 @@  discard block
 block discarded – undo
414 414
 
415 415
 				// Check if setting page has title section or not.
416 416
 				// If setting page does not have title section  then add title section to it and fix section end array id.
417
-				if ( 'title' !== $new_setting_fields[0]['type'] ) {
417
+				if ('title' !== $new_setting_fields[0]['type']) {
418 418
 					array_unshift(
419 419
 						$new_setting_fields,
420 420
 						array(
421
-							'title' => ( isset( $settings['give_title'] ) ? $settings['give_title'] : '' ),
421
+							'title' => (isset($settings['give_title']) ? $settings['give_title'] : ''),
422 422
 							'type'  => 'title',
423
-							'desc'  => ! empty( $setting_fields['desc'] ) ? $setting_fields['desc'] : '',
424
-							'id'    => ( isset( $settings['id'] ) ? $settings['id'] : '' ),
423
+							'desc'  => ! empty($setting_fields['desc']) ? $setting_fields['desc'] : '',
424
+							'id'    => (isset($settings['id']) ? $settings['id'] : ''),
425 425
 						)
426 426
 					);
427 427
 
428 428
 					// Update id in section end array if does not contain.
429
-					if ( empty( $new_setting_fields[ count( $new_setting_fields ) - 1 ]['id'] ) ) {
430
-						$new_setting_fields[ count( $new_setting_fields ) - 1 ]['id'] = ( isset( $settings['id'] ) ? $settings['id'] : '' );
429
+					if (empty($new_setting_fields[count($new_setting_fields) - 1]['id'])) {
430
+						$new_setting_fields[count($new_setting_fields) - 1]['id'] = (isset($settings['id']) ? $settings['id'] : '');
431 431
 					}
432 432
 				}
433 433
 
434 434
 				// Return only section related settings.
435
-				if ( $sections = $this->get_filtered_addon_sections() ) {
436
-					$new_setting_fields = $this->get_section_settings( $new_setting_fields );
435
+				if ($sections = $this->get_filtered_addon_sections()) {
436
+					$new_setting_fields = $this->get_section_settings($new_setting_fields);
437 437
 				}
438 438
 
439 439
 				// Third party plugin backward compatibility.
440
-				$wp_filter_keys = array_keys( $wp_filter );
441
-				foreach ( $new_setting_fields as $index => $field ) {
442
-					if ( ! isset( $field['type'] ) || in_array( $field['type'], array( 'title', 'sectionend' ) ) ) {
440
+				$wp_filter_keys = array_keys($wp_filter);
441
+				foreach ($new_setting_fields as $index => $field) {
442
+					if ( ! isset($field['type']) || in_array($field['type'], array('title', 'sectionend'))) {
443 443
 						continue;
444 444
 					}
445 445
 
446 446
 					$cmb2_filter_name = "cmb2_render_{$field['type']}";
447 447
 
448
-					if ( in_array( $cmb2_filter_name, $wp_filter_keys ) ) {
448
+					if (in_array($cmb2_filter_name, $wp_filter_keys)) {
449 449
 
450
-						if ( 0 >= version_compare( 4.7, get_bloginfo( 'version' ) ) && ! empty( $wp_filter[ $cmb2_filter_name ]->callbacks ) ) {
451
-							$cmb2_filter_arr = current( $wp_filter[ $cmb2_filter_name ]->callbacks );
450
+						if (0 >= version_compare(4.7, get_bloginfo('version')) && ! empty($wp_filter[$cmb2_filter_name]->callbacks)) {
451
+							$cmb2_filter_arr = current($wp_filter[$cmb2_filter_name]->callbacks);
452 452
 						} else {
453
-							$cmb2_filter_arr = current( $wp_filter[ $cmb2_filter_name ] );
453
+							$cmb2_filter_arr = current($wp_filter[$cmb2_filter_name]);
454 454
 						}
455 455
 
456
-						if ( ! empty( $cmb2_filter_arr ) ) {
456
+						if ( ! empty($cmb2_filter_arr)) {
457 457
 							// Note: function can be called either globally or with class object, it depends on how developer invoke it.
458
-							$new_setting_fields[ $index ]['func'] = current( $cmb2_filter_arr );
459
-							add_action( "give_admin_field_{$field['type']}", array(
458
+							$new_setting_fields[$index]['func'] = current($cmb2_filter_arr);
459
+							add_action("give_admin_field_{$field['type']}", array(
460 460
 								$this,
461 461
 								'addon_setting_field',
462
-							), 10, 2 );
462
+							), 10, 2);
463 463
 						}
464 464
 					}
465 465
 				}
@@ -480,31 +480,31 @@  discard block
 block discarded – undo
480 480
 		 *
481 481
 		 * @return array
482 482
 		 */
483
-		function get_section_settings( $tab_settings ) {
483
+		function get_section_settings($tab_settings) {
484 484
 			$current_section = give_get_current_setting_section();
485 485
 
486 486
 			// Note: If we are opening default tab for addon setting then it is possible that we will get empty string as current section
487 487
 			// 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
488 488
 			// This is hack to fix this.
489
-			if ( empty( $current_section ) ) {
490
-				$current_section = $this->set_default_setting_tab( $current_section );
489
+			if (empty($current_section)) {
490
+				$current_section = $this->set_default_setting_tab($current_section);
491 491
 			}
492 492
 
493 493
 			$section_start               = false;
494 494
 			$section_end                 = false;
495 495
 			$section_only_setting_fields = array();
496 496
 
497
-			foreach ( $tab_settings as $field ) {
498
-				if ( 'title' == $field['type'] && $current_section == sanitize_title( $field['title'] ) ) {
497
+			foreach ($tab_settings as $field) {
498
+				if ('title' == $field['type'] && $current_section == sanitize_title($field['title'])) {
499 499
 					$section_start = true;
500 500
 				}
501 501
 
502
-				if ( ! $section_start || $section_end ) {
502
+				if ( ! $section_start || $section_end) {
503 503
 					continue;
504 504
 				}
505 505
 
506
-				if ( $section_start && ! $section_end ) {
507
-					if ( 'sectionend' == $field['type'] ) {
506
+				if ($section_start && ! $section_end) {
507
+					if ('sectionend' == $field['type']) {
508 508
 						$section_end = true;
509 509
 					}
510 510
 					$section_only_setting_fields[] = $field;
@@ -514,7 +514,7 @@  discard block
 block discarded – undo
514 514
 			// Remove title from setting, prevent it from render in setting tab.
515 515
 			$section_only_setting_fields[0]['title'] = '';
516 516
 
517
-			return apply_filters( "give_get_settings_{$this->current_tab}_{$current_section}", $section_only_setting_fields, $tab_settings );
517
+			return apply_filters("give_get_settings_{$this->current_tab}_{$current_section}", $section_only_setting_fields, $tab_settings);
518 518
 		}
519 519
 
520 520
 
@@ -528,17 +528,17 @@  discard block
 block discarded – undo
528 528
 		 *
529 529
 		 * @return void
530 530
 		 */
531
-		function addon_setting_field( $field, $saved_value ) {
531
+		function addon_setting_field($field, $saved_value) {
532 532
 			// Create object for cmb2  function callback backward compatibility.
533 533
 			// Note: Do not call any cmb2 function on these objects
534
-			$field_obj      = (object) array( 'args' => $field );
535
-			$field_type_obj = (object) array( 'field' => $field_obj );
534
+			$field_obj      = (object) array('args' => $field);
535
+			$field_type_obj = (object) array('field' => $field_obj);
536 536
 
537
-			switch ( $this->current_tab ) :
537
+			switch ($this->current_tab) :
538 538
 				case 'licenses':
539 539
 					?>
540 540
 					<div class="give-settings-wrap give-settings-wrap-<?php echo $this->current_tab; ?>">
541
-						<?php $field['func']['function']( $field_obj, $saved_value, '', '', $field_type_obj ); ?>
541
+						<?php $field['func']['function']($field_obj, $saved_value, '', '', $field_type_obj); ?>
542 542
 					</div>
543 543
 					<?php break;
544 544
 
@@ -546,21 +546,21 @@  discard block
 block discarded – undo
546 546
 					$colspan = 'colspan="2"';
547 547
 					?>
548 548
 					<tr valign="top">
549
-						<?php if ( ! empty( $field['name'] ) && ! in_array( $field['name'], array( '&nbsp;' ) ) ) : ?>
549
+						<?php if ( ! empty($field['name']) && ! in_array($field['name'], array('&nbsp;'))) : ?>
550 550
 							<th scope="row" class="titledesc">
551
-								<label for="<?php echo esc_attr( $field['name'] ); ?>"><?php echo $field['title']; ?></label>
551
+								<label for="<?php echo esc_attr($field['name']); ?>"><?php echo $field['title']; ?></label>
552 552
 							</th>
553 553
 							<?php $colspan = ''; ?>
554 554
 						<?php endif; ?>
555 555
 						<td class="give-forminp" <?php echo $colspan; ?>>
556 556
 							<?php
557
-							if ( is_array( $field['func']['function'] ) ) {
557
+							if (is_array($field['func']['function'])) {
558 558
 								$classname = $field['func']['function'][0];
559 559
 								$function_name = $field['func']['function'][1];
560
-								$classname->$function_name( $field_obj, $saved_value, '', '', $field_type_obj );
560
+								$classname->$function_name($field_obj, $saved_value, '', '', $field_type_obj);
561 561
 							} else {
562 562
 								$function_name = $field['func']['function'];
563
-								$function_name( $field_obj, $saved_value, '', '', $field_type_obj );
563
+								$function_name($field_obj, $saved_value, '', '', $field_type_obj);
564 564
 							}
565 565
 							?>
566 566
 						</td>
@@ -578,10 +578,10 @@  discard block
 block discarded – undo
578 578
 		public function get_sections() {
579 579
 			$sections = array();
580 580
 
581
-			if ( ( $setting_fields = $this->prev_settings->give_settings( $this->current_tab ) ) && ! empty( $setting_fields['fields'] ) ) {
582
-				foreach ( $setting_fields['fields'] as $field ) {
583
-					if ( 'give_title' == $field['type'] ) {
584
-						$sections[ sanitize_title( $field['name'] ) ] = $this->get_section_name( $field['name'] );
581
+			if (($setting_fields = $this->prev_settings->give_settings($this->current_tab)) && ! empty($setting_fields['fields'])) {
582
+				foreach ($setting_fields['fields'] as $field) {
583
+					if ('give_title' == $field['type']) {
584
+						$sections[sanitize_title($field['name'])] = $this->get_section_name($field['name']);
585 585
 					}
586 586
 				}
587 587
 			}
@@ -601,16 +601,16 @@  discard block
 block discarded – undo
601 601
 
602 602
 			$new_setting_fields = array();
603 603
 
604
-			if ( $setting_fields = $this->prev_settings->give_settings( $this->current_tab ) ) {
605
-				if ( isset( $setting_fields['fields'] ) ) {
604
+			if ($setting_fields = $this->prev_settings->give_settings($this->current_tab)) {
605
+				if (isset($setting_fields['fields'])) {
606 606
 
607 607
 					$tab_data = array(
608 608
 						'id'         => $setting_fields['id'],
609 609
 						'give_title' => $setting_fields['give_title'],
610
-						'desc'       => ( isset( $setting_fields['desc'] ) ? $setting_fields['desc'] : '' ),
610
+						'desc'       => (isset($setting_fields['desc']) ? $setting_fields['desc'] : ''),
611 611
 					);
612 612
 
613
-					$new_setting_fields = $this->get_filtered_addon_settings( $setting_fields['fields'], $tab_data );
613
+					$new_setting_fields = $this->get_filtered_addon_settings($setting_fields['fields'], $tab_data);
614 614
 				}
615 615
 			}
616 616
 
@@ -627,24 +627,24 @@  discard block
 block discarded – undo
627 627
 			$sections = $this->get_sections();
628 628
 
629 629
 			// Show section settings only if setting section exist.
630
-			if ( $this->current_section && ! in_array( $this->current_section, array_keys( $sections ) ) ) {
631
-				echo '<div class="error"><p>' . __( 'Oops, this settings page does not exist.', 'give' ) . '</p></div>';
630
+			if ($this->current_section && ! in_array($this->current_section, array_keys($sections))) {
631
+				echo '<div class="error"><p>'.__('Oops, this settings page does not exist.', 'give').'</p></div>';
632 632
 				$GLOBALS['give_hide_save_button'] = true;
633 633
 
634 634
 				return;
635 635
 			}
636 636
 
637 637
 			// Bailout.
638
-			if ( empty( $sections ) ) {
638
+			if (empty($sections)) {
639 639
 				return;
640 640
 			}
641 641
 
642 642
 			echo '<ul class="subsubsub">';
643 643
 
644
-			$array_keys = array_keys( $sections );
644
+			$array_keys = array_keys($sections);
645 645
 
646
-			foreach ( $sections as $id => $label ) {
647
-				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>';
646
+			foreach ($sections as $id => $label) {
647
+				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>';
648 648
 			}
649 649
 
650 650
 			echo '</ul><br class="clear" /><hr>';
@@ -659,7 +659,7 @@  discard block
 block discarded – undo
659 659
 		public function output() {
660 660
 			$settings = $this->get_settings();
661 661
 
662
-			Give_Admin_Settings::output_fields( $settings, 'give_settings' );
662
+			Give_Admin_Settings::output_fields($settings, 'give_settings');
663 663
 		}
664 664
 
665 665
 		/**
@@ -671,7 +671,7 @@  discard block
 block discarded – undo
671 671
 		public function save() {
672 672
 			$settings = $this->get_settings();
673 673
 
674
-			Give_Admin_Settings::save_fields( $settings, 'give_settings' );
674
+			Give_Admin_Settings::save_fields($settings, 'give_settings');
675 675
 		}
676 676
 	}
677 677
 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
@@ -557,7 +557,7 @@  discard block
 block discarded – undo
557 557
 				type="radio"
558 558
 				style="' . esc_attr( $field['style'] ) . '"
559 559
 				' . checked( esc_attr( $field['value'] ), esc_attr( $key ), false ) . ' '
560
-		     . give_get_custom_attributes( $field ) . '
560
+			 . give_get_custom_attributes( $field ) . '
561 561
 				/> ' . esc_html( $value ) . '</label>
562 562
 		</li>';
563 563
 	}
@@ -725,9 +725,9 @@  discard block
 block discarded – undo
725 725
 	$field['title'] = isset( $field['title'] ) ? $field['title'] : 'Documentation';
726 726
 
727 727
 	echo '<p class="give-docs-link"><a href="' . esc_url( $field['url'] )
728
-	     . '" target="_blank">'
729
-	     . sprintf( esc_html__( 'Need Help? See docs on "%s"', 'give' ), $field['title'] )
730
-	     . '<span class="dashicons dashicons-editor-help"></span></a></p>';
728
+		 . '" target="_blank">'
729
+		 . sprintf( esc_html__( 'Need Help? See docs on "%s"', 'give' ), $field['title'] )
730
+		 . '<span class="dashicons dashicons-editor-help"></span></a></p>';
731 731
 }
732 732
 
733 733
 
Please login to merge, or discard this patch.
Spacing   +377 added lines, -377 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;
@@ -82,8 +82,8 @@  discard block
 block discarded – undo
82 82
 		default:
83 83
 
84 84
 			if (
85
-				array_key_exists( 'callback', $field )
86
-				&& ! empty( $field['callback'] )
85
+				array_key_exists('callback', $field)
86
+				&& ! empty($field['callback'])
87 87
 			) {
88 88
 				$func_name = $field['callback'];
89 89
 			} else {
@@ -96,15 +96,15 @@  discard block
 block discarded – undo
96 96
 	 *
97 97
 	 * @since 1.8
98 98
 	 */
99
-	$func_name = apply_filters( 'give_get_field_callback', $func_name, $field );
99
+	$func_name = apply_filters('give_get_field_callback', $func_name, $field);
100 100
 
101 101
 	// Exit if not any function exist.
102 102
 	// Check if render callback exist or not.
103
-	if ( empty( $func_name ) ) {
103
+	if (empty($func_name)) {
104 104
 		return false;
105
-	} elseif ( is_string( $func_name ) && ! function_exists( "$func_name" ) ) {
105
+	} elseif (is_string($func_name) && ! function_exists("$func_name")) {
106 106
 		return false;
107
-	} elseif ( is_array( $func_name ) && ! method_exists( $func_name[0], "$func_name[1]" ) ) {
107
+	} elseif (is_array($func_name) && ! method_exists($func_name[0], "$func_name[1]")) {
108 108
 		return false;
109 109
 	}
110 110
 
@@ -120,35 +120,35 @@  discard block
 block discarded – undo
120 120
  *
121 121
  * @return bool
122 122
  */
123
-function give_render_field( $field ) {
123
+function give_render_field($field) {
124 124
 
125 125
 	// Check if render callback exist or not.
126
-	if ( ! ( $func_name = give_get_field_callback( $field ) ) ) {
126
+	if ( ! ($func_name = give_get_field_callback($field))) {
127 127
 		return false;
128 128
 	}
129 129
 
130 130
 	// CMB2 compatibility: Push all classes to attributes's class key
131
-	if ( empty( $field['class'] ) ) {
131
+	if (empty($field['class'])) {
132 132
 		$field['class'] = '';
133 133
 	}
134 134
 
135
-	if ( empty( $field['attributes']['class'] ) ) {
135
+	if (empty($field['attributes']['class'])) {
136 136
 		$field['attributes']['class'] = '';
137 137
 	}
138 138
 
139
-	$field['attributes']['class'] = trim( "give-field {$field['attributes']['class']} give-{$field['type']} {$field['class']}" );
140
-	unset( $field['class'] );
139
+	$field['attributes']['class'] = trim("give-field {$field['attributes']['class']} give-{$field['type']} {$field['class']}");
140
+	unset($field['class']);
141 141
 
142 142
 	// CMB2 compatibility: Set wrapper class if any.
143
-	if ( ! empty( $field['row_classes'] ) ) {
143
+	if ( ! empty($field['row_classes'])) {
144 144
 		$field['wrapper_class'] = $field['row_classes'];
145
-		unset( $field['row_classes'] );
145
+		unset($field['row_classes']);
146 146
 	}
147 147
 
148 148
 	// Set field params on basis of cmb2 field name.
149
-	switch ( $field['type'] ) {
149
+	switch ($field['type']) {
150 150
 		case 'radio_inline':
151
-			if ( empty( $field['wrapper_class'] ) ) {
151
+			if (empty($field['wrapper_class'])) {
152 152
 				$field['wrapper_class'] = '';
153 153
 			}
154 154
 			$field['wrapper_class'] .= ' give-inline-radio-fields';
@@ -161,15 +161,15 @@  discard block
 block discarded – undo
161 161
 		case 'text-small' :
162 162
 		case 'text_small' :
163 163
 			// CMB2 compatibility: Set field type to text.
164
-			$field['type'] = isset( $field['attributes']['type'] ) ? $field['attributes']['type'] : 'text';
164
+			$field['type'] = isset($field['attributes']['type']) ? $field['attributes']['type'] : 'text';
165 165
 
166 166
 			// CMB2 compatibility: Set data type to price.
167 167
 			if (
168
-				empty( $field['data_type'] )
169
-				&& ! empty( $field['attributes']['class'] )
168
+				empty($field['data_type'])
169
+				&& ! empty($field['attributes']['class'])
170 170
 				&& (
171
-					false !== strpos( $field['attributes']['class'], 'money' )
172
-					|| false !== strpos( $field['attributes']['class'], 'amount' )
171
+					false !== strpos($field['attributes']['class'], 'money')
172
+					|| false !== strpos($field['attributes']['class'], 'amount')
173 173
 				)
174 174
 			) {
175 175
 				$field['data_type'] = 'decimal';
@@ -188,26 +188,26 @@  discard block
 block discarded – undo
188 188
 		case 'give_default_radio_inline':
189 189
 			$field['type']    = 'radio';
190 190
 			$field['options'] = array(
191
-				'default' => __( 'Default' ),
191
+				'default' => __('Default'),
192 192
 			);
193 193
 			break;
194 194
 
195 195
 		case 'donation_limit':
196
-			$field['type']  = 'donation_limit';
196
+			$field['type'] = 'donation_limit';
197 197
 			break;
198 198
 	}
199 199
 
200 200
 	// CMB2 compatibility: Add support to define field description by desc & description param.
201 201
 	// We encourage you to use description param.
202
-	$field['description'] = ( ! empty( $field['description'] )
202
+	$field['description'] = ( ! empty($field['description'])
203 203
 		? $field['description']
204
-		: ( ! empty( $field['desc'] ) ? $field['desc'] : '' ) );
204
+		: ( ! empty($field['desc']) ? $field['desc'] : ''));
205 205
 
206 206
 	// Call render function.
207
-	if ( is_array( $func_name ) ) {
208
-		$func_name[0]->{$func_name[1]}( $field );
207
+	if (is_array($func_name)) {
208
+		$func_name[0]->{$func_name[1]}($field);
209 209
 	} else {
210
-		$func_name( $field );
210
+		$func_name($field);
211 211
 	}
212 212
 
213 213
 	return true;
@@ -237,29 +237,29 @@  discard block
 block discarded – undo
237 237
  * }
238 238
  * @return void
239 239
  */
240
-function give_text_input( $field ) {
240
+function give_text_input($field) {
241 241
 	global $thepostid, $post;
242 242
 
243
-	$thepostid              = empty( $thepostid ) ? $post->ID : $thepostid;
244
-	$field['style']         = isset( $field['style'] ) ? $field['style'] : '';
245
-	$field['wrapper_class'] = isset( $field['wrapper_class'] ) ? $field['wrapper_class'] : '';
246
-	$field['value']         = give_get_field_value( $field, $thepostid );
247
-	$field['type']          = isset( $field['type'] ) ? $field['type'] : 'text';
243
+	$thepostid              = empty($thepostid) ? $post->ID : $thepostid;
244
+	$field['style']         = isset($field['style']) ? $field['style'] : '';
245
+	$field['wrapper_class'] = isset($field['wrapper_class']) ? $field['wrapper_class'] : '';
246
+	$field['value']         = give_get_field_value($field, $thepostid);
247
+	$field['type']          = isset($field['type']) ? $field['type'] : 'text';
248 248
 	$field['before_field']  = '';
249 249
 	$field['after_field']   = '';
250
-	$data_type              = empty( $field['data_type'] ) ? '' : $field['data_type'];
250
+	$data_type              = empty($field['data_type']) ? '' : $field['data_type'];
251 251
 
252
-	switch ( $data_type ) {
252
+	switch ($data_type) {
253 253
 		case 'price' :
254
-			$field['value'] = ( ! empty( $field['value'] ) ? give_format_amount( give_maybe_sanitize_amount( $field['value'] ), array( 'sanitize' => false ) ) : $field['value'] );
254
+			$field['value'] = ( ! empty($field['value']) ? give_format_amount(give_maybe_sanitize_amount($field['value']), array('sanitize' => false)) : $field['value']);
255 255
 
256
-			$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>' : '' );
257
-			$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>' : '' );
256
+			$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>' : '');
257
+			$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>' : '');
258 258
 			break;
259 259
 
260 260
 		case 'decimal' :
261 261
 			$field['attributes']['class'] .= ' give_input_decimal';
262
-			$field['value']               = ( ! empty( $field['value'] ) ? give_format_decimal( give_maybe_sanitize_amount( $field['value'] ), false, false ) : $field['value'] );
262
+			$field['value'] = ( ! empty($field['value']) ? give_format_decimal(give_maybe_sanitize_amount($field['value']), false, false) : $field['value']);
263 263
 			break;
264 264
 
265 265
 		default :
@@ -267,20 +267,20 @@  discard block
 block discarded – undo
267 267
 	}
268 268
 
269 269
 	?>
270
-	<p class="give-field-wrap <?php echo esc_attr( $field['id'] ); ?>_field <?php echo esc_attr( $field['wrapper_class'] ); ?>">
271
-	<label for="<?php echo give_get_field_name( $field ); ?>"><?php echo wp_kses_post( $field['name'] ); ?></label>
270
+	<p class="give-field-wrap <?php echo esc_attr($field['id']); ?>_field <?php echo esc_attr($field['wrapper_class']); ?>">
271
+	<label for="<?php echo give_get_field_name($field); ?>"><?php echo wp_kses_post($field['name']); ?></label>
272 272
 	<?php echo $field['before_field']; ?>
273 273
 	<input
274
-			type="<?php echo esc_attr( $field['type'] ); ?>"
275
-			style="<?php echo esc_attr( $field['style'] ); ?>"
276
-			name="<?php echo give_get_field_name( $field ); ?>"
277
-			id="<?php echo esc_attr( $field['id'] ); ?>"
278
-			value="<?php echo esc_attr( $field['value'] ); ?>"
279
-		<?php echo give_get_custom_attributes( $field ); ?>
274
+			type="<?php echo esc_attr($field['type']); ?>"
275
+			style="<?php echo esc_attr($field['style']); ?>"
276
+			name="<?php echo give_get_field_name($field); ?>"
277
+			id="<?php echo esc_attr($field['id']); ?>"
278
+			value="<?php echo esc_attr($field['value']); ?>"
279
+		<?php echo give_get_custom_attributes($field); ?>
280 280
 	/>
281 281
 	<?php echo $field['after_field']; ?>
282 282
 	<?php
283
-	echo give_get_field_description( $field );
283
+	echo give_get_field_description($field);
284 284
 	echo '</p>';
285 285
 }
286 286
 
@@ -310,27 +310,27 @@  discard block
 block discarded – undo
310 310
  *
311 311
  * @return void
312 312
  */
313
-function give_donation_limit( $field ) {
313
+function give_donation_limit($field) {
314 314
 	global $thepostid, $post;
315 315
 
316 316
 	// Get Give donation form ID.
317
-	$thepostid = empty( $thepostid ) ? $post->ID : $thepostid;
317
+	$thepostid = empty($thepostid) ? $post->ID : $thepostid;
318 318
 
319 319
 	// Default arguments.
320 320
 	$default_options = array(
321 321
 		'style'         => '',
322 322
 		'wrapper_class' => '',
323
-		'value'         => give_get_field_value( $field, $thepostid ),
323
+		'value'         => give_get_field_value($field, $thepostid),
324 324
 		'data_type'     => 'decimal',
325 325
 		'before_field'  => '',
326 326
 		'after_field'   => '',
327 327
 	);
328 328
 
329 329
 	// Field options.
330
-	$field['options'] = ! empty( $field['options'] ) ? $field['options'] : array();
330
+	$field['options'] = ! empty($field['options']) ? $field['options'] : array();
331 331
 
332 332
 	// Default field option arguments.
333
-	$field['options'] = wp_parse_args( $field['options'], array(
333
+	$field['options'] = wp_parse_args($field['options'], array(
334 334
 			'display_label' => '',
335 335
 			'minimum'       => 1.00,
336 336
 			'maximum'       => 999999.99,
@@ -338,78 +338,78 @@  discard block
 block discarded – undo
338 338
 	);
339 339
 
340 340
 	// Set default field options.
341
-	$field_options = wp_parse_args( $field, $default_options );
341
+	$field_options = wp_parse_args($field, $default_options);
342 342
 
343 343
 	// Get default minimum value, if empty.
344
-	$field_options['value']['minimum'] = ! empty( $field_options['value']['minimum'] )
344
+	$field_options['value']['minimum'] = ! empty($field_options['value']['minimum'])
345 345
 		? $field_options['value']['minimum']
346 346
 		: $field_options['options']['minimum'];
347 347
 
348 348
 	// Get default maximum value, if empty.
349
-	$field_options['value']['maximum'] = ! empty( $field_options['value']['maximum'] )
349
+	$field_options['value']['maximum'] = ! empty($field_options['value']['maximum'])
350 350
 		? $field_options['value']['maximum']
351 351
 		: $field_options['options']['maximum'];
352 352
 	?>
353
-	<p class="give-field-wrap <?php echo esc_attr( $field_options['id'] ); ?>_field <?php echo esc_attr( $field_options['wrapper_class'] ); ?>">
354
-	<label for="<?php echo give_get_field_name( $field_options ); ?>"><?php echo wp_kses_post( $field_options['name'] ); ?></label>
353
+	<p class="give-field-wrap <?php echo esc_attr($field_options['id']); ?>_field <?php echo esc_attr($field_options['wrapper_class']); ?>">
354
+	<label for="<?php echo give_get_field_name($field_options); ?>"><?php echo wp_kses_post($field_options['name']); ?></label>
355 355
 	<span class="give_donation_limit_display">
356 356
 		<?php
357
-		foreach ( $field_options['value'] as $amount_range => $amount_value ) {
357
+		foreach ($field_options['value'] as $amount_range => $amount_value) {
358 358
 
359
-			switch ( $field_options['data_type'] ) {
359
+			switch ($field_options['data_type']) {
360 360
 				case 'price' :
361
-					$currency_position = give_get_option( 'currency_position', 'before' );
362
-					$price_field_labels     = 'minimum' === $amount_range ? __( 'Minimum amount', 'give' ) : __( 'Maximum amount', 'give' );
361
+					$currency_position = give_get_option('currency_position', 'before');
362
+					$price_field_labels = 'minimum' === $amount_range ? __('Minimum amount', 'give') : __('Maximum amount', 'give');
363 363
 
364 364
 					$tooltip_html = array(
365
-						'before' => Give()->tooltips->render_span( array(
365
+						'before' => Give()->tooltips->render_span(array(
366 366
 							'label'       => $price_field_labels,
367
-							'tag_content' => sprintf( '<span class="give-money-symbol give-money-symbol-before">%s</span>', give_currency_symbol() ),
368
-						) ),
369
-						'after'  => Give()->tooltips->render_span( array(
367
+							'tag_content' => sprintf('<span class="give-money-symbol give-money-symbol-before">%s</span>', give_currency_symbol()),
368
+						)),
369
+						'after'  => Give()->tooltips->render_span(array(
370 370
 							'label'       => $price_field_labels,
371
-							'tag_content' => sprintf( '<span class="give-money-symbol give-money-symbol-after">%s</span>', give_currency_symbol() ),
372
-						) ),
371
+							'tag_content' => sprintf('<span class="give-money-symbol give-money-symbol-after">%s</span>', give_currency_symbol()),
372
+						)),
373 373
 					);
374 374
 
375
-					$before_html = ! empty( $field_options['before_field'] )
375
+					$before_html = ! empty($field_options['before_field'])
376 376
 						? $field_options['before_field']
377
-						: ( 'before' === $currency_position ? $tooltip_html['before'] : '' );
377
+						: ('before' === $currency_position ? $tooltip_html['before'] : '');
378 378
 
379
-					$after_html = ! empty( $field_options['after_field'] )
379
+					$after_html = ! empty($field_options['after_field'])
380 380
 						? $field_options['after_field']
381
-						: ( 'after' === $currency_position ? $tooltip_html['after'] : '' );
381
+						: ('after' === $currency_position ? $tooltip_html['after'] : '');
382 382
 
383
-					$field_options['attributes']['class']    .= ' give-text_small';
384
-					$field_options['value'][ $amount_range ] = give_maybe_sanitize_amount( $amount_value );
383
+					$field_options['attributes']['class'] .= ' give-text_small';
384
+					$field_options['value'][$amount_range] = give_maybe_sanitize_amount($amount_value);
385 385
 					break;
386 386
 				case 'decimal' :
387
-					$field_options['attributes']['class']    .= ' give_input_decimal give-text_small';
388
-					$field_options['value'][ $amount_range ] = $amount_value;
387
+					$field_options['attributes']['class'] .= ' give_input_decimal give-text_small';
388
+					$field_options['value'][$amount_range] = $amount_value;
389 389
 					break;
390 390
 			}
391 391
 
392 392
 			echo '<span class=give-minmax-wrap>';
393
-			printf( '<label for="%1$s_give_donation_limit_%2$s">%3$s</label>', esc_attr( $field_options['id'] ), esc_attr( $amount_range ), esc_html( $price_field_labels ) );
393
+			printf('<label for="%1$s_give_donation_limit_%2$s">%3$s</label>', esc_attr($field_options['id']), esc_attr($amount_range), esc_html($price_field_labels));
394 394
 
395
-			echo isset( $before_html ) ? $before_html : '';
395
+			echo isset($before_html) ? $before_html : '';
396 396
 			?>
397 397
 			<input
398
-					name="<?php echo give_get_field_name( $field_options ); ?>[<?php echo esc_attr( $amount_range ); ?>]"
398
+					name="<?php echo give_get_field_name($field_options); ?>[<?php echo esc_attr($amount_range); ?>]"
399 399
 					type="text"
400 400
 					id="<?php echo $field_options['id']; ?>_give_donation_limit_<?php echo $amount_range; ?>"
401
-					data-range_type="<?php echo esc_attr( $amount_range ); ?>"
402
-					value="<?php echo give_format_decimal( esc_attr( $field_options['value'][ $amount_range ] ) ); ?>"
403
-					placeholder="<?php echo give_format_decimal( $field_options['options'][ $amount_range ] ); ?>"
404
-				<?php echo give_get_custom_attributes( $field_options ); ?>
401
+					data-range_type="<?php echo esc_attr($amount_range); ?>"
402
+					value="<?php echo give_format_decimal(esc_attr($field_options['value'][$amount_range])); ?>"
403
+					placeholder="<?php echo give_format_decimal($field_options['options'][$amount_range]); ?>"
404
+				<?php echo give_get_custom_attributes($field_options); ?>
405 405
 			/>
406 406
 			<?php
407
-			echo isset( $after_html ) ? $after_html : '';
407
+			echo isset($after_html) ? $after_html : '';
408 408
 			echo '</span>';
409 409
 		}
410 410
 		?>
411 411
 	</span>
412
-		<?php echo give_get_field_description( $field_options ); ?>
412
+		<?php echo give_get_field_description($field_options); ?>
413 413
 	</p>
414 414
 	<?php
415 415
 }
@@ -432,29 +432,29 @@  discard block
 block discarded – undo
432 432
  * }
433 433
  * @return void
434 434
  */
435
-function give_hidden_input( $field ) {
435
+function give_hidden_input($field) {
436 436
 	global $thepostid, $post;
437 437
 
438
-	$thepostid      = empty( $thepostid ) ? $post->ID : $thepostid;
439
-	$field['value'] = give_get_field_value( $field, $thepostid );
438
+	$thepostid      = empty($thepostid) ? $post->ID : $thepostid;
439
+	$field['value'] = give_get_field_value($field, $thepostid);
440 440
 
441 441
 	// Custom attribute handling
442 442
 	$custom_attributes = array();
443 443
 
444
-	if ( ! empty( $field['attributes'] ) && is_array( $field['attributes'] ) ) {
444
+	if ( ! empty($field['attributes']) && is_array($field['attributes'])) {
445 445
 
446
-		foreach ( $field['attributes'] as $attribute => $value ) {
447
-			$custom_attributes[] = esc_attr( $attribute ) . '="' . esc_attr( $value ) . '"';
446
+		foreach ($field['attributes'] as $attribute => $value) {
447
+			$custom_attributes[] = esc_attr($attribute).'="'.esc_attr($value).'"';
448 448
 		}
449 449
 	}
450 450
 	?>
451 451
 
452 452
 	<input
453 453
 			type="hidden"
454
-			name="<?php echo give_get_field_name( $field ); ?>"
455
-			id="<?php echo esc_attr( $field['id'] ); ?>"
456
-			value="<?php echo esc_attr( $field['value'] ); ?>"
457
-		<?php echo give_get_custom_attributes( $field ); ?>
454
+			name="<?php echo give_get_field_name($field); ?>"
455
+			id="<?php echo esc_attr($field['id']); ?>"
456
+			value="<?php echo esc_attr($field['value']); ?>"
457
+		<?php echo give_get_custom_attributes($field); ?>
458 458
 	/>
459 459
 	<?php
460 460
 }
@@ -480,27 +480,27 @@  discard block
 block discarded – undo
480 480
  * }
481 481
  * @return void
482 482
  */
483
-function give_textarea_input( $field ) {
483
+function give_textarea_input($field) {
484 484
 	global $thepostid, $post;
485 485
 
486
-	$thepostid              = empty( $thepostid ) ? $post->ID : $thepostid;
487
-	$field['style']         = isset( $field['style'] ) ? $field['style'] : '';
488
-	$field['wrapper_class'] = isset( $field['wrapper_class'] ) ? $field['wrapper_class'] : '';
489
-	$field['value']         = give_get_field_value( $field, $thepostid );
486
+	$thepostid              = empty($thepostid) ? $post->ID : $thepostid;
487
+	$field['style']         = isset($field['style']) ? $field['style'] : '';
488
+	$field['wrapper_class'] = isset($field['wrapper_class']) ? $field['wrapper_class'] : '';
489
+	$field['value']         = give_get_field_value($field, $thepostid);
490 490
 
491 491
 	?>
492
-	<p class="give-field-wrap <?php echo esc_attr( $field['id'] ); ?>_field <?php echo esc_attr( $field['wrapper_class'] ); ?>">
493
-	<label for="<?php echo give_get_field_name( $field ); ?>"><?php echo wp_kses_post( $field['name'] ); ?></label>
492
+	<p class="give-field-wrap <?php echo esc_attr($field['id']); ?>_field <?php echo esc_attr($field['wrapper_class']); ?>">
493
+	<label for="<?php echo give_get_field_name($field); ?>"><?php echo wp_kses_post($field['name']); ?></label>
494 494
 	<textarea
495
-			style="<?php echo esc_attr( $field['style'] ); ?>"
496
-			name="<?php echo give_get_field_name( $field ); ?>"
497
-			id="<?php echo esc_attr( $field['id'] ); ?>"
495
+			style="<?php echo esc_attr($field['style']); ?>"
496
+			name="<?php echo give_get_field_name($field); ?>"
497
+			id="<?php echo esc_attr($field['id']); ?>"
498 498
 			rows="10"
499 499
 			cols="20"
500
-		<?php echo give_get_custom_attributes( $field ); ?>
501
-	><?php echo esc_textarea( $field['value'] ); ?></textarea>
500
+		<?php echo give_get_custom_attributes($field); ?>
501
+	><?php echo esc_textarea($field['value']); ?></textarea>
502 502
 	<?php
503
-	echo give_get_field_description( $field );
503
+	echo give_get_field_description($field);
504 504
 	echo '</p>';
505 505
 }
506 506
 
@@ -524,29 +524,29 @@  discard block
 block discarded – undo
524 524
  * }
525 525
  * @return void
526 526
  */
527
-function give_wysiwyg( $field ) {
527
+function give_wysiwyg($field) {
528 528
 	global $thepostid, $post;
529 529
 
530
-	$thepostid              = empty( $thepostid ) ? $post->ID : $thepostid;
531
-	$field['value']         = give_get_field_value( $field, $thepostid );
532
-	$field['style']         = isset( $field['style'] ) ? $field['style'] : '';
533
-	$field['wrapper_class'] = isset( $field['wrapper_class'] ) ? $field['wrapper_class'] : '';
530
+	$thepostid              = empty($thepostid) ? $post->ID : $thepostid;
531
+	$field['value']         = give_get_field_value($field, $thepostid);
532
+	$field['style']         = isset($field['style']) ? $field['style'] : '';
533
+	$field['wrapper_class'] = isset($field['wrapper_class']) ? $field['wrapper_class'] : '';
534 534
 
535
-	$field['unique_field_id'] = give_get_field_name( $field );
535
+	$field['unique_field_id'] = give_get_field_name($field);
536 536
 	$editor_attributes        = array(
537
-		'textarea_name' => isset( $field['repeatable_field_id'] ) ? $field['repeatable_field_id'] : $field['id'],
537
+		'textarea_name' => isset($field['repeatable_field_id']) ? $field['repeatable_field_id'] : $field['id'],
538 538
 		'textarea_rows' => '10',
539
-		'editor_css'    => esc_attr( $field['style'] ),
539
+		'editor_css'    => esc_attr($field['style']),
540 540
 		'editor_class'  => $field['attributes']['class'],
541 541
 	);
542
-	$data_wp_editor           = ' data-wp-editor="' . base64_encode( json_encode( array(
542
+	$data_wp_editor = ' data-wp-editor="'.base64_encode(json_encode(array(
543 543
 			$field['value'],
544 544
 			$field['unique_field_id'],
545 545
 			$editor_attributes,
546
-		) ) ) . '"';
547
-	$data_wp_editor           = isset( $field['repeatable_field_id'] ) ? $data_wp_editor : '';
546
+		))).'"';
547
+	$data_wp_editor = isset($field['repeatable_field_id']) ? $data_wp_editor : '';
548 548
 
549
-	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>';
549
+	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>';
550 550
 
551 551
 	wp_editor(
552 552
 		$field['value'],
@@ -554,7 +554,7 @@  discard block
 block discarded – undo
554 554
 		$editor_attributes
555 555
 	);
556 556
 
557
-	echo give_get_field_description( $field );
557
+	echo give_get_field_description($field);
558 558
 	echo '</div>';
559 559
 }
560 560
 
@@ -579,29 +579,29 @@  discard block
 block discarded – undo
579 579
  * }
580 580
  * @return void
581 581
  */
582
-function give_checkbox( $field ) {
582
+function give_checkbox($field) {
583 583
 	global $thepostid, $post;
584 584
 
585
-	$thepostid              = empty( $thepostid ) ? $post->ID : $thepostid;
586
-	$field['style']         = isset( $field['style'] ) ? $field['style'] : '';
587
-	$field['wrapper_class'] = isset( $field['wrapper_class'] ) ? $field['wrapper_class'] : '';
588
-	$field['value']         = give_get_field_value( $field, $thepostid );
589
-	$field['cbvalue']       = isset( $field['cbvalue'] ) ? $field['cbvalue'] : 'on';
590
-	$field['name']          = isset( $field['name'] ) ? $field['name'] : $field['id'];
585
+	$thepostid              = empty($thepostid) ? $post->ID : $thepostid;
586
+	$field['style']         = isset($field['style']) ? $field['style'] : '';
587
+	$field['wrapper_class'] = isset($field['wrapper_class']) ? $field['wrapper_class'] : '';
588
+	$field['value']         = give_get_field_value($field, $thepostid);
589
+	$field['cbvalue']       = isset($field['cbvalue']) ? $field['cbvalue'] : 'on';
590
+	$field['name']          = isset($field['name']) ? $field['name'] : $field['id'];
591 591
 	?>
592
-	<p class="give-field-wrap <?php echo esc_attr( $field['id'] ); ?>_field <?php echo esc_attr( $field['wrapper_class'] ); ?>">
593
-	<label for="<?php echo give_get_field_name( $field ); ?>"><?php echo wp_kses_post( $field['name'] ); ?></label>
592
+	<p class="give-field-wrap <?php echo esc_attr($field['id']); ?>_field <?php echo esc_attr($field['wrapper_class']); ?>">
593
+	<label for="<?php echo give_get_field_name($field); ?>"><?php echo wp_kses_post($field['name']); ?></label>
594 594
 	<input
595 595
 			type="checkbox"
596
-			style="<?php echo esc_attr( $field['style'] ); ?>"
597
-			name="<?php echo give_get_field_name( $field ); ?>"
598
-			id="<?php echo esc_attr( $field['id'] ); ?>"
599
-			value="<?php echo esc_attr( $field['cbvalue'] ); ?>"
600
-		<?php echo checked( $field['value'], $field['cbvalue'], false ); ?>
601
-		<?php echo give_get_custom_attributes( $field ); ?>
596
+			style="<?php echo esc_attr($field['style']); ?>"
597
+			name="<?php echo give_get_field_name($field); ?>"
598
+			id="<?php echo esc_attr($field['id']); ?>"
599
+			value="<?php echo esc_attr($field['cbvalue']); ?>"
600
+		<?php echo checked($field['value'], $field['cbvalue'], false); ?>
601
+		<?php echo give_get_custom_attributes($field); ?>
602 602
 	/>
603 603
 	<?php
604
-	echo give_get_field_description( $field );
604
+	echo give_get_field_description($field);
605 605
 	echo '</p>';
606 606
 }
607 607
 
@@ -627,29 +627,29 @@  discard block
 block discarded – undo
627 627
  * }
628 628
  * @return void
629 629
  */
630
-function give_select( $field ) {
630
+function give_select($field) {
631 631
 	global $thepostid, $post;
632 632
 
633
-	$thepostid              = empty( $thepostid ) ? $post->ID : $thepostid;
634
-	$field['style']         = isset( $field['style'] ) ? $field['style'] : '';
635
-	$field['wrapper_class'] = isset( $field['wrapper_class'] ) ? $field['wrapper_class'] : '';
636
-	$field['value']         = give_get_field_value( $field, $thepostid );
637
-	$field['name']          = isset( $field['name'] ) ? $field['name'] : $field['id'];
633
+	$thepostid              = empty($thepostid) ? $post->ID : $thepostid;
634
+	$field['style']         = isset($field['style']) ? $field['style'] : '';
635
+	$field['wrapper_class'] = isset($field['wrapper_class']) ? $field['wrapper_class'] : '';
636
+	$field['value']         = give_get_field_value($field, $thepostid);
637
+	$field['name']          = isset($field['name']) ? $field['name'] : $field['id'];
638 638
 	?>
639
-	<p class="give-field-wrap <?php echo esc_attr( $field['id'] ); ?>_field <?php echo esc_attr( $field['wrapper_class'] ); ?>">
640
-	<label for="<?php echo give_get_field_name( $field ); ?>"><?php echo wp_kses_post( $field['name'] ); ?></label>
639
+	<p class="give-field-wrap <?php echo esc_attr($field['id']); ?>_field <?php echo esc_attr($field['wrapper_class']); ?>">
640
+	<label for="<?php echo give_get_field_name($field); ?>"><?php echo wp_kses_post($field['name']); ?></label>
641 641
 	<select
642
-	id="<?php echo esc_attr( $field['id'] ); ?>"
643
-	name="<?php echo give_get_field_name( $field ); ?>"
644
-	style="<?php echo esc_attr( $field['style'] ) ?>"
645
-	<?php echo give_get_custom_attributes( $field ); ?>
642
+	id="<?php echo esc_attr($field['id']); ?>"
643
+	name="<?php echo give_get_field_name($field); ?>"
644
+	style="<?php echo esc_attr($field['style']) ?>"
645
+	<?php echo give_get_custom_attributes($field); ?>
646 646
 	>
647 647
 	<?php
648
-	foreach ( $field['options'] as $key => $value ) {
649
-		echo '<option value="' . esc_attr( $key ) . '" ' . selected( esc_attr( $field['value'] ), esc_attr( $key ), false ) . '>' . esc_html( $value ) . '</option>';
648
+	foreach ($field['options'] as $key => $value) {
649
+		echo '<option value="'.esc_attr($key).'" '.selected(esc_attr($field['value']), esc_attr($key), false).'>'.esc_html($value).'</option>';
650 650
 	}
651 651
 	echo '</select>';
652
-	echo give_get_field_description( $field );
652
+	echo give_get_field_description($field);
653 653
 	echo '</p>';
654 654
 }
655 655
 
@@ -676,32 +676,32 @@  discard block
 block discarded – undo
676 676
  * }
677 677
  * @return void
678 678
  */
679
-function give_radio( $field ) {
679
+function give_radio($field) {
680 680
 	global $thepostid, $post;
681 681
 
682
-	$thepostid              = empty( $thepostid ) ? $post->ID : $thepostid;
683
-	$field['style']         = isset( $field['style'] ) ? $field['style'] : '';
684
-	$field['wrapper_class'] = isset( $field['wrapper_class'] ) ? $field['wrapper_class'] : '';
685
-	$field['value']         = give_get_field_value( $field, $thepostid );
686
-	$field['name']          = isset( $field['name'] ) ? $field['name'] : $field['id'];
682
+	$thepostid              = empty($thepostid) ? $post->ID : $thepostid;
683
+	$field['style']         = isset($field['style']) ? $field['style'] : '';
684
+	$field['wrapper_class'] = isset($field['wrapper_class']) ? $field['wrapper_class'] : '';
685
+	$field['value']         = give_get_field_value($field, $thepostid);
686
+	$field['name']          = isset($field['name']) ? $field['name'] : $field['id'];
687 687
 
688
-	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">';
688
+	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">';
689 689
 
690
-	foreach ( $field['options'] as $key => $value ) {
690
+	foreach ($field['options'] as $key => $value) {
691 691
 
692 692
 		echo '<li><label><input
693
-				name="' . give_get_field_name( $field ) . '"
694
-				value="' . esc_attr( $key ) . '"
693
+				name="' . give_get_field_name($field).'"
694
+				value="' . esc_attr($key).'"
695 695
 				type="radio"
696
-				style="' . esc_attr( $field['style'] ) . '"
697
-				' . checked( esc_attr( $field['value'] ), esc_attr( $key ), false ) . ' '
698
-		     . give_get_custom_attributes( $field ) . '
699
-				/> ' . esc_html( $value ) . '</label>
696
+				style="' . esc_attr($field['style']).'"
697
+				' . checked(esc_attr($field['value']), esc_attr($key), false).' '
698
+		     . give_get_custom_attributes($field).'
699
+				/> ' . esc_html($value).'</label>
700 700
 		</li>';
701 701
 	}
702 702
 	echo '</ul>';
703 703
 
704
-	echo give_get_field_description( $field );
704
+	echo give_get_field_description($field);
705 705
 	echo '</fieldset>';
706 706
 }
707 707
 
@@ -725,27 +725,27 @@  discard block
 block discarded – undo
725 725
  * }
726 726
  * @return void
727 727
  */
728
-function give_colorpicker( $field ) {
728
+function give_colorpicker($field) {
729 729
 	global $thepostid, $post;
730 730
 
731
-	$thepostid              = empty( $thepostid ) ? $post->ID : $thepostid;
732
-	$field['style']         = isset( $field['style'] ) ? $field['style'] : '';
733
-	$field['wrapper_class'] = isset( $field['wrapper_class'] ) ? $field['wrapper_class'] : '';
734
-	$field['value']         = give_get_field_value( $field, $thepostid );
735
-	$field['name']          = isset( $field['name'] ) ? $field['name'] : $field['id'];
731
+	$thepostid              = empty($thepostid) ? $post->ID : $thepostid;
732
+	$field['style']         = isset($field['style']) ? $field['style'] : '';
733
+	$field['wrapper_class'] = isset($field['wrapper_class']) ? $field['wrapper_class'] : '';
734
+	$field['value']         = give_get_field_value($field, $thepostid);
735
+	$field['name']          = isset($field['name']) ? $field['name'] : $field['id'];
736 736
 	$field['type']          = 'text';
737 737
 	?>
738
-	<p class="give-field-wrap <?php echo esc_attr( $field['id'] ); ?>_field <?php echo esc_attr( $field['wrapper_class'] ); ?>">
739
-	<label for="<?php echo give_get_field_name( $field ); ?>"><?php echo wp_kses_post( $field['name'] ); ?></label>
738
+	<p class="give-field-wrap <?php echo esc_attr($field['id']); ?>_field <?php echo esc_attr($field['wrapper_class']); ?>">
739
+	<label for="<?php echo give_get_field_name($field); ?>"><?php echo wp_kses_post($field['name']); ?></label>
740 740
 	<input
741
-			type="<?php echo esc_attr( $field['type'] ); ?>"
742
-			style="<?php echo esc_attr( $field['style'] ); ?>"
743
-			name="<?php echo give_get_field_name( $field ); ?>"
744
-			id="' . esc_attr( $field['id'] ) . '" value="<?php echo esc_attr( $field['value'] ); ?>"
745
-		<?php echo give_get_custom_attributes( $field ); ?>
741
+			type="<?php echo esc_attr($field['type']); ?>"
742
+			style="<?php echo esc_attr($field['style']); ?>"
743
+			name="<?php echo give_get_field_name($field); ?>"
744
+			id="' . esc_attr( $field['id'] ) . '" value="<?php echo esc_attr($field['value']); ?>"
745
+		<?php echo give_get_custom_attributes($field); ?>
746 746
 	/>
747 747
 	<?php
748
-	echo give_get_field_description( $field );
748
+	echo give_get_field_description($field);
749 749
 	echo '</p>';
750 750
 }
751 751
 
@@ -756,8 +756,8 @@  discard block
 block discarded – undo
756 756
  *
757 757
  * @param array $field
758 758
  */
759
-function give_file( $field ) {
760
-	give_media( $field );
759
+function give_file($field) {
760
+	give_media($field);
761 761
 }
762 762
 
763 763
 
@@ -768,37 +768,37 @@  discard block
 block discarded – undo
768 768
  *
769 769
  * @param array $field
770 770
  */
771
-function give_media( $field ) {
771
+function give_media($field) {
772 772
 	global $thepostid, $post;
773 773
 
774
-	$thepostid    = empty( $thepostid ) ? $post->ID : $thepostid;
775
-	$button_label = sprintf( __( 'Add or Upload %s', 'give' ), ( 'file' === $field['type'] ? __( 'File', 'give' ) : __( 'Image', 'give' ) ) );
774
+	$thepostid    = empty($thepostid) ? $post->ID : $thepostid;
775
+	$button_label = sprintf(__('Add or Upload %s', 'give'), ('file' === $field['type'] ? __('File', 'give') : __('Image', 'give')));
776 776
 
777
-	$field['style']               = isset( $field['style'] ) ? $field['style'] : '';
778
-	$field['wrapper_class']       = isset( $field['wrapper_class'] ) ? $field['wrapper_class'] : '';
779
-	$field['value']               = give_get_field_value( $field, $thepostid );
780
-	$field['name']                = isset( $field['name'] ) ? $field['name'] : $field['id'];
777
+	$field['style']               = isset($field['style']) ? $field['style'] : '';
778
+	$field['wrapper_class']       = isset($field['wrapper_class']) ? $field['wrapper_class'] : '';
779
+	$field['value']               = give_get_field_value($field, $thepostid);
780
+	$field['name']                = isset($field['name']) ? $field['name'] : $field['id'];
781 781
 	$field['attributes']['class'] = "{$field['attributes']['class']} give-text-medium";
782 782
 
783 783
 	// Allow developer to save attachment ID or attachment url as metadata.
784
-	$field['fvalue'] = isset( $field['fvalue'] ) ? $field['fvalue'] : 'url';
784
+	$field['fvalue'] = isset($field['fvalue']) ? $field['fvalue'] : 'url';
785 785
 
786
-	$allow_media_preview_tags = array( 'jpg', 'jpeg', 'png', 'gif', 'ico' );
787
-	$preview_image_src        = $field['value'] ? ( 'id' === $field['fvalue'] ? wp_get_attachment_url( $field['value'] ) : $field['value'] ) : '#';
788
-	$preview_image_extension  = $preview_image_src ? pathinfo( $preview_image_src, PATHINFO_EXTENSION ) : '';
789
-	$is_show_preview          = in_array( $preview_image_extension, $allow_media_preview_tags );
786
+	$allow_media_preview_tags = array('jpg', 'jpeg', 'png', 'gif', 'ico');
787
+	$preview_image_src        = $field['value'] ? ('id' === $field['fvalue'] ? wp_get_attachment_url($field['value']) : $field['value']) : '#';
788
+	$preview_image_extension  = $preview_image_src ? pathinfo($preview_image_src, PATHINFO_EXTENSION) : '';
789
+	$is_show_preview          = in_array($preview_image_extension, $allow_media_preview_tags);
790 790
 	?>
791
-	<fieldset class="give-field-wrap <?php echo esc_attr( $field['id'] ); ?>_field <?php echo esc_attr( $field['wrapper_class'] ); ?>">
792
-		<label for="<?php echo give_get_field_name( $field ) ?>"><?php echo wp_kses_post( $field['name'] ); ?></label>
791
+	<fieldset class="give-field-wrap <?php echo esc_attr($field['id']); ?>_field <?php echo esc_attr($field['wrapper_class']); ?>">
792
+		<label for="<?php echo give_get_field_name($field) ?>"><?php echo wp_kses_post($field['name']); ?></label>
793 793
 		<input
794
-				name="<?php echo give_get_field_name( $field ); ?>"
795
-				id="<?php echo esc_attr( $field['id'] ); ?>"
794
+				name="<?php echo give_get_field_name($field); ?>"
795
+				id="<?php echo esc_attr($field['id']); ?>"
796 796
 				type="text"
797 797
 				value="<?php echo $field['value']; ?>"
798
-				style="<?php echo esc_attr( $field['style'] ); ?>"
799
-			<?php echo give_get_custom_attributes( $field ); ?>
798
+				style="<?php echo esc_attr($field['style']); ?>"
799
+			<?php echo give_get_custom_attributes($field); ?>
800 800
 		/>&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']; ?>">
801
-		<?php echo give_get_field_description( $field ); ?>
801
+		<?php echo give_get_field_description($field); ?>
802 802
 		<div class="give-image-thumb<?php echo ! $field['value'] || ! $is_show_preview ? ' give-hidden' : ''; ?>">
803 803
 			<span class="give-delete-image-thumb dashicons dashicons-no-alt"></span>
804 804
 			<img src="<?php echo $preview_image_src; ?>" alt="">
@@ -816,27 +816,27 @@  discard block
 block discarded – undo
816 816
  *
817 817
  * @return void
818 818
  */
819
-function give_default_gateway( $field ) {
819
+function give_default_gateway($field) {
820 820
 	global $thepostid, $post;
821 821
 
822 822
 	// get all active payment gateways.
823
-	$gateways         = give_get_enabled_payment_gateways( $thepostid );
823
+	$gateways         = give_get_enabled_payment_gateways($thepostid);
824 824
 	$field['options'] = array();
825 825
 
826 826
 	// Set field option value.
827
-	if ( ! empty( $gateways ) ) {
828
-		foreach ( $gateways as $key => $option ) {
829
-			$field['options'][ $key ] = $option['admin_label'];
827
+	if ( ! empty($gateways)) {
828
+		foreach ($gateways as $key => $option) {
829
+			$field['options'][$key] = $option['admin_label'];
830 830
 		}
831 831
 	}
832 832
 
833 833
 	// Add a field to the Give Form admin single post view of this field
834
-	if ( is_object( $post ) && 'give_forms' === $post->post_type ) {
835
-		$field['options'] = array_merge( array( 'global' => esc_html__( 'Global Default', 'give' ) ), $field['options'] );
834
+	if (is_object($post) && 'give_forms' === $post->post_type) {
835
+		$field['options'] = array_merge(array('global' => esc_html__('Global Default', 'give')), $field['options']);
836 836
 	}
837 837
 
838 838
 	// Render select field.
839
-	give_select( $field );
839
+	give_select($field);
840 840
 }
841 841
 
842 842
 /**
@@ -858,13 +858,13 @@  discard block
 block discarded – undo
858 858
  * @return void
859 859
  */
860 860
 
861
-function give_docs_link( $field ) {
862
-	$field['url']   = isset( $field['url'] ) ? $field['url'] : 'https://givewp.com/documentation';
863
-	$field['title'] = isset( $field['title'] ) ? $field['title'] : 'Documentation';
861
+function give_docs_link($field) {
862
+	$field['url']   = isset($field['url']) ? $field['url'] : 'https://givewp.com/documentation';
863
+	$field['title'] = isset($field['title']) ? $field['title'] : 'Documentation';
864 864
 
865
-	echo '<p class="give-docs-link"><a href="' . esc_url( $field['url'] )
865
+	echo '<p class="give-docs-link"><a href="'.esc_url($field['url'])
866 866
 	     . '" target="_blank">'
867
-	     . sprintf( esc_html__( 'Need Help? See docs on "%s"', 'give' ), $field['title'] )
867
+	     . sprintf(esc_html__('Need Help? See docs on "%s"', 'give'), $field['title'])
868 868
 	     . '<span class="dashicons dashicons-editor-help"></span></a></p>';
869 869
 }
870 870
 
@@ -876,15 +876,15 @@  discard block
 block discarded – undo
876 876
  *
877 877
  * @param $field
878 878
  */
879
-function give_email_preview_buttons( $field ) {
879
+function give_email_preview_buttons($field) {
880 880
 	/* @var WP_Post $post */
881 881
 	global $post;
882 882
 
883
-	$field_id = str_replace( array( '_give_', '_preview_buttons' ), '', $field['id'] );
883
+	$field_id = str_replace(array('_give_', '_preview_buttons'), '', $field['id']);
884 884
 
885 885
 	ob_start();
886 886
 
887
-	echo '<p class="give-field-wrap ' . esc_attr( $field['id'] ) . '_field"><label for="' . give_get_field_name( $field ) . '">' . wp_kses_post( $field['name'] ) . '</label>';
887
+	echo '<p class="give-field-wrap '.esc_attr($field['id']).'_field"><label for="'.give_get_field_name($field).'">'.wp_kses_post($field['name']).'</label>';
888 888
 
889 889
 	echo sprintf(
890 890
 		'<a href="%1$s" class="button-secondary" target="_blank">%2$s</a>',
@@ -912,12 +912,12 @@  discard block
 block discarded – undo
912 912
 					'form_id'      => $post->ID,
913 913
 				)
914 914
 			), 'give-send-preview-email' ),
915
-		esc_attr__( 'Send Test Email.', 'give' ),
916
-		esc_html__( 'Send Test Email', 'give' )
915
+		esc_attr__('Send Test Email.', 'give'),
916
+		esc_html__('Send Test Email', 'give')
917 917
 	);
918 918
 
919
-	if ( ! empty( $field['description'] ) ) {
920
-		echo '<span class="give-field-description">' . wp_kses_post( $field['desc'] ) . '</span>';
919
+	if ( ! empty($field['description'])) {
920
+		echo '<span class="give-field-description">'.wp_kses_post($field['desc']).'</span>';
921 921
 	}
922 922
 
923 923
 	echo '</p>';
@@ -938,29 +938,29 @@  discard block
 block discarded – undo
938 938
  *
939 939
  * @return mixed
940 940
  */
941
-function give_get_field_value( $field, $postid ) {
942
-	if ( isset( $field['attributes']['value'] ) ) {
941
+function give_get_field_value($field, $postid) {
942
+	if (isset($field['attributes']['value'])) {
943 943
 		return $field['attributes']['value'];
944 944
 	}
945 945
 
946 946
 	// If field is range slider.
947
-	if ( 'donation_limit' === $field['type'] ) {
947
+	if ('donation_limit' === $field['type']) {
948 948
 
949 949
 		// Get minimum value.
950
-		$minimum = give_get_meta( $postid, $field['id'] . '_minimum', true );
950
+		$minimum = give_get_meta($postid, $field['id'].'_minimum', true);
951 951
 
952 952
 		// Give < 2.1
953
-		if ( '_give_custom_amount_range' === $field['id'] && empty( $minimum ) ) {
954
-			$minimum = give_get_meta( $postid, '_give_custom_amount_minimum', true );
953
+		if ('_give_custom_amount_range' === $field['id'] && empty($minimum)) {
954
+			$minimum = give_get_meta($postid, '_give_custom_amount_minimum', true);
955 955
 		}
956 956
 
957 957
 		$field_value = array(
958 958
 			'minimum' => $minimum,
959
-			'maximum' => give_get_meta( $postid, $field['id'] . '_maximum', true ),
959
+			'maximum' => give_get_meta($postid, $field['id'].'_maximum', true),
960 960
 		);
961 961
 	} else {
962 962
 		// Get value from db.
963
-		$field_value = give_get_meta( $postid, $field['id'], true );
963
+		$field_value = give_get_meta($postid, $field['id'], true);
964 964
 	}
965 965
 
966 966
 	/**
@@ -970,10 +970,10 @@  discard block
 block discarded – undo
970 970
 	 *
971 971
 	 * @param mixed $field_value Field value.
972 972
 	 */
973
-	$field_value = apply_filters( "{$field['id']}_field_value", $field_value, $field, $postid );
973
+	$field_value = apply_filters("{$field['id']}_field_value", $field_value, $field, $postid);
974 974
 
975 975
 	// Set default value if no any data saved to db.
976
-	if ( ! $field_value && isset( $field['default'] ) ) {
976
+	if ( ! $field_value && isset($field['default'])) {
977 977
 		$field_value = $field['default'];
978 978
 	}
979 979
 
@@ -990,20 +990,20 @@  discard block
 block discarded – undo
990 990
  *
991 991
  * @return string
992 992
  */
993
-function give_get_field_description( $field ) {
993
+function give_get_field_description($field) {
994 994
 	$field_desc_html = '';
995 995
 	$description     = '';
996 996
 
997 997
 	// Check for both `description` and `desc`.
998
-	if ( isset( $field['description'] ) ) {
998
+	if (isset($field['description'])) {
999 999
 		$description = $field['description'];
1000
-	} elseif ( isset( $field['desc'] ) ) {
1000
+	} elseif (isset($field['desc'])) {
1001 1001
 		$description = $field['desc'];
1002 1002
 	}
1003 1003
 
1004 1004
 	// Set if there is a description.
1005
-	if ( ! empty( $description ) ) {
1006
-		$field_desc_html = '<span class="give-field-description">' . wp_kses_post( $description ) . '</span>';
1005
+	if ( ! empty($description)) {
1006
+		$field_desc_html = '<span class="give-field-description">'.wp_kses_post($description).'</span>';
1007 1007
 	}
1008 1008
 
1009 1009
 	return $field_desc_html;
@@ -1023,8 +1023,8 @@  discard block
 block discarded – undo
1023 1023
  *
1024 1024
  * @return string
1025 1025
  */
1026
-function give_get_repeater_field_value( $field, $field_group, $fields ) {
1027
-	$field_value = ( isset( $field_group[ $field['id'] ] ) ? $field_group[ $field['id'] ] : '' );
1026
+function give_get_repeater_field_value($field, $field_group, $fields) {
1027
+	$field_value = (isset($field_group[$field['id']]) ? $field_group[$field['id']] : '');
1028 1028
 
1029 1029
 	/**
1030 1030
 	 * Filter the specific repeater field value
@@ -1033,7 +1033,7 @@  discard block
 block discarded – undo
1033 1033
 	 *
1034 1034
 	 * @param string $field_id
1035 1035
 	 */
1036
-	$field_value = apply_filters( "give_get_repeater_field_{$field['id']}_value", $field_value, $field, $field_group, $fields );
1036
+	$field_value = apply_filters("give_get_repeater_field_{$field['id']}_value", $field_value, $field, $field_group, $fields);
1037 1037
 
1038 1038
 	/**
1039 1039
 	 * Filter the repeater field value
@@ -1042,7 +1042,7 @@  discard block
 block discarded – undo
1042 1042
 	 *
1043 1043
 	 * @param string $field_id
1044 1044
 	 */
1045
-	$field_value = apply_filters( 'give_get_repeater_field_value', $field_value, $field, $field_group, $fields );
1045
+	$field_value = apply_filters('give_get_repeater_field_value', $field_value, $field, $field_group, $fields);
1046 1046
 
1047 1047
 	return $field_value;
1048 1048
 }
@@ -1060,7 +1060,7 @@  discard block
 block discarded – undo
1060 1060
  *
1061 1061
  * @return string
1062 1062
  */
1063
-function give_get_repeater_field_id( $field, $fields, $default = false ) {
1063
+function give_get_repeater_field_id($field, $fields, $default = false) {
1064 1064
 	$row_placeholder = false !== $default ? $default : '{{row-count-placeholder}}';
1065 1065
 
1066 1066
 	// Get field id.
@@ -1073,7 +1073,7 @@  discard block
 block discarded – undo
1073 1073
 	 *
1074 1074
 	 * @param string $field_id
1075 1075
 	 */
1076
-	$field_id = apply_filters( "give_get_repeater_field_{$field['id']}_id", $field_id, $field, $fields, $default );
1076
+	$field_id = apply_filters("give_get_repeater_field_{$field['id']}_id", $field_id, $field, $fields, $default);
1077 1077
 
1078 1078
 	/**
1079 1079
 	 * Filter the repeater field id
@@ -1082,7 +1082,7 @@  discard block
 block discarded – undo
1082 1082
 	 *
1083 1083
 	 * @param string $field_id
1084 1084
 	 */
1085
-	$field_id = apply_filters( 'give_get_repeater_field_id', $field_id, $field, $fields, $default );
1085
+	$field_id = apply_filters('give_get_repeater_field_id', $field_id, $field, $fields, $default);
1086 1086
 
1087 1087
 	return $field_id;
1088 1088
 }
@@ -1097,8 +1097,8 @@  discard block
 block discarded – undo
1097 1097
  *
1098 1098
  * @return string
1099 1099
  */
1100
-function give_get_field_name( $field ) {
1101
-	$field_name = esc_attr( empty( $field['repeat'] ) ? $field['id'] : $field['repeatable_field_id'] );
1100
+function give_get_field_name($field) {
1101
+	$field_name = esc_attr(empty($field['repeat']) ? $field['id'] : $field['repeatable_field_id']);
1102 1102
 
1103 1103
 	/**
1104 1104
 	 * Filter the field name.
@@ -1107,7 +1107,7 @@  discard block
 block discarded – undo
1107 1107
 	 *
1108 1108
 	 * @param string $field_name
1109 1109
 	 */
1110
-	$field_name = apply_filters( 'give_get_field_name', $field_name, $field );
1110
+	$field_name = apply_filters('give_get_field_name', $field_name, $field);
1111 1111
 
1112 1112
 	return $field_name;
1113 1113
 }
@@ -1124,40 +1124,40 @@  discard block
 block discarded – undo
1124 1124
  *
1125 1125
  * @return void
1126 1126
  */
1127
-function _give_metabox_form_data_repeater_fields( $fields ) {
1127
+function _give_metabox_form_data_repeater_fields($fields) {
1128 1128
 	global $thepostid, $post;
1129 1129
 
1130 1130
 	// Bailout.
1131
-	if ( ! isset( $fields['fields'] ) || empty( $fields['fields'] ) ) {
1131
+	if ( ! isset($fields['fields']) || empty($fields['fields'])) {
1132 1132
 		return;
1133 1133
 	}
1134 1134
 
1135
-	$group_numbering = isset( $fields['options']['group_numbering'] ) ? (int) $fields['options']['group_numbering'] : 0;
1136
-	$close_tabs      = isset( $fields['options']['close_tabs'] ) ? (int) $fields['options']['close_tabs'] : 0;
1137
-	$wrapper_class   = isset( $fields['wrapper_class'] ) ? $fields['wrapper_class'] : '';
1135
+	$group_numbering = isset($fields['options']['group_numbering']) ? (int) $fields['options']['group_numbering'] : 0;
1136
+	$close_tabs      = isset($fields['options']['close_tabs']) ? (int) $fields['options']['close_tabs'] : 0;
1137
+	$wrapper_class   = isset($fields['wrapper_class']) ? $fields['wrapper_class'] : '';
1138 1138
 	?>
1139
-	<div class="give-repeatable-field-section <?php echo esc_attr( $wrapper_class ); ?>" id="<?php echo "{$fields['id']}_field"; ?>"
1139
+	<div class="give-repeatable-field-section <?php echo esc_attr($wrapper_class); ?>" id="<?php echo "{$fields['id']}_field"; ?>"
1140 1140
 	     data-group-numbering="<?php echo $group_numbering; ?>" data-close-tabs="<?php echo $close_tabs; ?>">
1141
-		<?php if ( ! empty( $fields['name'] ) ) : ?>
1141
+		<?php if ( ! empty($fields['name'])) : ?>
1142 1142
 			<p class="give-repeater-field-name"><?php echo $fields['name']; ?></p>
1143 1143
 		<?php endif; ?>
1144 1144
 
1145
-		<?php if ( ! empty( $fields['description'] ) ) : ?>
1145
+		<?php if ( ! empty($fields['description'])) : ?>
1146 1146
 			<p class="give-repeater-field-description"><?php echo $fields['description']; ?></p>
1147 1147
 		<?php endif; ?>
1148 1148
 
1149 1149
 		<table class="give-repeatable-fields-section-wrapper" cellspacing="0">
1150 1150
 			<?php
1151
-			$repeater_field_values = give_get_meta( $thepostid, $fields['id'], true );
1152
-			$header_title          = isset( $fields['options']['header_title'] )
1151
+			$repeater_field_values = give_get_meta($thepostid, $fields['id'], true);
1152
+			$header_title          = isset($fields['options']['header_title'])
1153 1153
 				? $fields['options']['header_title']
1154
-				: esc_attr__( 'Group', 'give' );
1154
+				: esc_attr__('Group', 'give');
1155 1155
 
1156 1156
 			$add_default_donation_field = false;
1157 1157
 
1158 1158
 			// Check if level is not created or we have to add default level.
1159
-			if ( is_array( $repeater_field_values ) && ( $fields_count = count( $repeater_field_values ) ) ) {
1160
-				$repeater_field_values = array_values( $repeater_field_values );
1159
+			if (is_array($repeater_field_values) && ($fields_count = count($repeater_field_values))) {
1160
+				$repeater_field_values = array_values($repeater_field_values);
1161 1161
 			} else {
1162 1162
 				$fields_count               = 1;
1163 1163
 				$add_default_donation_field = true;
@@ -1170,77 +1170,77 @@  discard block
 block discarded – undo
1170 1170
 					<div class="give-row-head give-move">
1171 1171
 						<button type="button" class="handlediv button-link"><span class="toggle-indicator"></span>
1172 1172
 						</button>
1173
-						<span class="give-remove" title="<?php esc_html_e( 'Remove Group', 'give' ); ?>">-</span>
1173
+						<span class="give-remove" title="<?php esc_html_e('Remove Group', 'give'); ?>">-</span>
1174 1174
 						<h2>
1175 1175
 							<span data-header-title="<?php echo $header_title; ?>"><?php echo $header_title; ?></span>
1176 1176
 						</h2>
1177 1177
 					</div>
1178 1178
 					<div class="give-row-body">
1179
-						<?php foreach ( $fields['fields'] as $field ) : ?>
1179
+						<?php foreach ($fields['fields'] as $field) : ?>
1180 1180
 							<?php
1181
-							if ( ! give_is_field_callback_exist( $field ) ) {
1181
+							if ( ! give_is_field_callback_exist($field)) {
1182 1182
 								continue;
1183 1183
 							}
1184 1184
 							?>
1185 1185
 							<?php
1186 1186
 							$field['repeat']              = true;
1187
-							$field['repeatable_field_id'] = give_get_repeater_field_id( $field, $fields );
1187
+							$field['repeatable_field_id'] = give_get_repeater_field_id($field, $fields);
1188 1188
 							$field['id']                  = str_replace(
1189
-								array( '[', ']' ),
1190
-								array( '_', '', ),
1189
+								array('[', ']'),
1190
+								array('_', '',),
1191 1191
 								$field['repeatable_field_id']
1192 1192
 							);
1193 1193
 							?>
1194
-							<?php give_render_field( $field ); ?>
1194
+							<?php give_render_field($field); ?>
1195 1195
 						<?php endforeach; ?>
1196 1196
 					</div>
1197 1197
 				</td>
1198 1198
 			</tr>
1199 1199
 
1200
-			<?php if ( ! empty( $repeater_field_values ) ) : ?>
1200
+			<?php if ( ! empty($repeater_field_values)) : ?>
1201 1201
 				<!--Stored repeater field group-->
1202
-				<?php foreach ( $repeater_field_values as $index => $field_group ) : ?>
1202
+				<?php foreach ($repeater_field_values as $index => $field_group) : ?>
1203 1203
 					<tr class="give-row">
1204 1204
 						<td class="give-repeater-field-wrap give-column" colspan="2">
1205 1205
 							<div class="give-row-head give-move">
1206 1206
 								<button type="button" class="handlediv button-link">
1207 1207
 									<span class="toggle-indicator"></span></button>
1208
-								<span class="give-remove" title="<?php esc_html_e( 'Remove Group', 'give' ); ?>">-
1208
+								<span class="give-remove" title="<?php esc_html_e('Remove Group', 'give'); ?>">-
1209 1209
 								</span>
1210 1210
 								<h2>
1211 1211
 									<span data-header-title="<?php echo $header_title; ?>"><?php echo $header_title; ?></span>
1212 1212
 								</h2>
1213 1213
 							</div>
1214 1214
 							<div class="give-row-body">
1215
-								<?php foreach ( $fields['fields'] as $field ) : ?>
1216
-									<?php if ( ! give_is_field_callback_exist( $field ) ) {
1215
+								<?php foreach ($fields['fields'] as $field) : ?>
1216
+									<?php if ( ! give_is_field_callback_exist($field)) {
1217 1217
 										continue;
1218 1218
 									} ?>
1219 1219
 									<?php
1220 1220
 									$field['repeat']              = true;
1221
-									$field['repeatable_field_id'] = give_get_repeater_field_id( $field, $fields, $index );
1222
-									$field['attributes']['value'] = give_get_repeater_field_value( $field, $field_group, $fields );
1221
+									$field['repeatable_field_id'] = give_get_repeater_field_id($field, $fields, $index);
1222
+									$field['attributes']['value'] = give_get_repeater_field_value($field, $field_group, $fields);
1223 1223
 									$field['id']                  = str_replace(
1224
-										array( '[', ']' ),
1225
-										array( '_', '', ),
1224
+										array('[', ']'),
1225
+										array('_', '',),
1226 1226
 										$field['repeatable_field_id']
1227 1227
 									);
1228 1228
 									?>
1229
-									<?php give_render_field( $field ); ?>
1229
+									<?php give_render_field($field); ?>
1230 1230
 								<?php endforeach; ?>
1231 1231
 							</div>
1232 1232
 						</td>
1233 1233
 					</tr>
1234
-				<?php endforeach;; ?>
1234
+				<?php endforeach; ; ?>
1235 1235
 
1236
-			<?php elseif ( $add_default_donation_field ) : ?>
1236
+			<?php elseif ($add_default_donation_field) : ?>
1237 1237
 				<!--Default repeater field group-->
1238 1238
 				<tr class="give-row">
1239 1239
 					<td class="give-repeater-field-wrap give-column" colspan="2">
1240 1240
 						<div class="give-row-head give-move">
1241 1241
 							<button type="button" class="handlediv button-link">
1242 1242
 								<span class="toggle-indicator"></span></button>
1243
-							<span class="give-remove" title="<?php esc_html_e( 'Remove Group', 'give' ); ?>">-
1243
+							<span class="give-remove" title="<?php esc_html_e('Remove Group', 'give'); ?>">-
1244 1244
 							</span>
1245 1245
 							<h2>
1246 1246
 								<span data-header-title="<?php echo $header_title; ?>"><?php echo $header_title; ?></span>
@@ -1248,25 +1248,25 @@  discard block
 block discarded – undo
1248 1248
 						</div>
1249 1249
 						<div class="give-row-body">
1250 1250
 							<?php
1251
-							foreach ( $fields['fields'] as $field ) :
1252
-								if ( ! give_is_field_callback_exist( $field ) ) {
1251
+							foreach ($fields['fields'] as $field) :
1252
+								if ( ! give_is_field_callback_exist($field)) {
1253 1253
 									continue;
1254 1254
 								}
1255 1255
 
1256 1256
 								$field['repeat']              = true;
1257
-								$field['repeatable_field_id'] = give_get_repeater_field_id( $field, $fields, 0 );
1257
+								$field['repeatable_field_id'] = give_get_repeater_field_id($field, $fields, 0);
1258 1258
 								$field['attributes']['value'] = apply_filters(
1259 1259
 									"give_default_field_group_field_{$field['id']}_value",
1260
-									( ! empty( $field['default'] ) ? $field['default'] : '' ),
1260
+									( ! empty($field['default']) ? $field['default'] : ''),
1261 1261
 									$field,
1262 1262
 									$fields
1263 1263
 								);
1264
-								$field['id']                  = str_replace(
1265
-									array( '[', ']' ),
1266
-									array( '_', '', ),
1264
+								$field['id'] = str_replace(
1265
+									array('[', ']'),
1266
+									array('_', '',),
1267 1267
 									$field['repeatable_field_id']
1268 1268
 								);
1269
-								give_render_field( $field );
1269
+								give_render_field($field);
1270 1270
 
1271 1271
 							endforeach;
1272 1272
 							?>
@@ -1278,9 +1278,9 @@  discard block
 block discarded – undo
1278 1278
 			<tfoot>
1279 1279
 			<tr>
1280 1280
 				<?php
1281
-				$add_row_btn_title = isset( $fields['options']['add_button'] )
1281
+				$add_row_btn_title = isset($fields['options']['add_button'])
1282 1282
 					? $add_row_btn_title = $fields['options']['add_button']
1283
-					: esc_html__( 'Add Row', 'give' );
1283
+					: esc_html__('Add Row', 'give');
1284 1284
 				?>
1285 1285
 				<td colspan="2" class="give-add-repeater-field-section-row-wrap">
1286 1286
 					<span class="button button-primary give-add-repeater-field-section-row"><?php echo $add_row_btn_title; ?></span>
@@ -1310,10 +1310,10 @@  discard block
 block discarded – undo
1310 1310
 	 *
1311 1311
 	 * @param string
1312 1312
 	 */
1313
-	$default_current_tab = apply_filters( "give_default_setting_tab_{$current_setting_page}", 'general' );
1313
+	$default_current_tab = apply_filters("give_default_setting_tab_{$current_setting_page}", 'general');
1314 1314
 
1315 1315
 	// Get current tab.
1316
-	$current_tab = empty( $_GET['tab'] ) ? $default_current_tab : urldecode( $_GET['tab'] );
1316
+	$current_tab = empty($_GET['tab']) ? $default_current_tab : urldecode($_GET['tab']);
1317 1317
 
1318 1318
 	// Output.
1319 1319
 	return $current_tab;
@@ -1337,10 +1337,10 @@  discard block
 block discarded – undo
1337 1337
 	 *
1338 1338
 	 * @param string
1339 1339
 	 */
1340
-	$default_current_section = apply_filters( "give_default_setting_tab_section_{$current_tab}", '' );
1340
+	$default_current_section = apply_filters("give_default_setting_tab_section_{$current_tab}", '');
1341 1341
 
1342 1342
 	// Get current section.
1343
-	$current_section = empty( $_REQUEST['section'] ) ? $default_current_section : urldecode( $_REQUEST['section'] );
1343
+	$current_section = empty($_REQUEST['section']) ? $default_current_section : urldecode($_REQUEST['section']);
1344 1344
 
1345 1345
 	// Output.
1346 1346
 	return $current_section;
@@ -1354,7 +1354,7 @@  discard block
 block discarded – undo
1354 1354
  */
1355 1355
 function give_get_current_setting_page() {
1356 1356
 	// Get current page.
1357
-	$setting_page = ! empty( $_GET['page'] ) ? urldecode( $_GET['page'] ) : '';
1357
+	$setting_page = ! empty($_GET['page']) ? urldecode($_GET['page']) : '';
1358 1358
 
1359 1359
 	// Output.
1360 1360
 	return $setting_page;
@@ -1374,13 +1374,13 @@  discard block
 block discarded – undo
1374 1374
  *
1375 1375
  * @return string
1376 1376
  */
1377
-function _give_display_content_field_value( $field_value, $field, $postid ) {
1378
-	$show_content = give_get_meta( $postid, '_give_content_option', true );
1377
+function _give_display_content_field_value($field_value, $field, $postid) {
1378
+	$show_content = give_get_meta($postid, '_give_content_option', true);
1379 1379
 
1380 1380
 	if (
1381
-		! give_get_meta( $postid, '_give_display_content', true )
1381
+		! give_get_meta($postid, '_give_display_content', true)
1382 1382
 		&& $show_content
1383
-		&& ( 'none' !== $show_content )
1383
+		&& ('none' !== $show_content)
1384 1384
 	) {
1385 1385
 		$field_value = 'enabled';
1386 1386
 	}
@@ -1388,7 +1388,7 @@  discard block
 block discarded – undo
1388 1388
 	return $field_value;
1389 1389
 }
1390 1390
 
1391
-add_filter( '_give_display_content_field_value', '_give_display_content_field_value', 10, 3 );
1391
+add_filter('_give_display_content_field_value', '_give_display_content_field_value', 10, 3);
1392 1392
 
1393 1393
 
1394 1394
 /**
@@ -1405,12 +1405,12 @@  discard block
 block discarded – undo
1405 1405
  *
1406 1406
  * @return string
1407 1407
  */
1408
-function _give_content_placement_field_value( $field_value, $field, $postid ) {
1409
-	$show_content = give_get_meta( $postid, '_give_content_option', true );
1408
+function _give_content_placement_field_value($field_value, $field, $postid) {
1409
+	$show_content = give_get_meta($postid, '_give_content_option', true);
1410 1410
 
1411 1411
 	if (
1412
-		! give_get_meta( $postid, '_give_content_placement', true )
1413
-		&& ( 'none' !== $show_content )
1412
+		! give_get_meta($postid, '_give_content_placement', true)
1413
+		&& ('none' !== $show_content)
1414 1414
 	) {
1415 1415
 		$field_value = $show_content;
1416 1416
 	}
@@ -1418,7 +1418,7 @@  discard block
 block discarded – undo
1418 1418
 	return $field_value;
1419 1419
 }
1420 1420
 
1421
-add_filter( '_give_content_placement_field_value', '_give_content_placement_field_value', 10, 3 );
1421
+add_filter('_give_content_placement_field_value', '_give_content_placement_field_value', 10, 3);
1422 1422
 
1423 1423
 
1424 1424
 /**
@@ -1434,17 +1434,17 @@  discard block
 block discarded – undo
1434 1434
  *
1435 1435
  * @return string
1436 1436
  */
1437
-function _give_terms_option_field_value( $field_value, $field, $postid ) {
1438
-	$term_option = give_get_meta( $postid, '_give_terms_option', true );
1437
+function _give_terms_option_field_value($field_value, $field, $postid) {
1438
+	$term_option = give_get_meta($postid, '_give_terms_option', true);
1439 1439
 
1440
-	if ( in_array( $term_option, array( 'none', 'yes' ) ) ) {
1441
-		$field_value = ( 'yes' === $term_option ? 'enabled' : 'disabled' );
1440
+	if (in_array($term_option, array('none', 'yes'))) {
1441
+		$field_value = ('yes' === $term_option ? 'enabled' : 'disabled');
1442 1442
 	}
1443 1443
 
1444 1444
 	return $field_value;
1445 1445
 }
1446 1446
 
1447
-add_filter( '_give_terms_option_field_value', '_give_terms_option_field_value', 10, 3 );
1447
+add_filter('_give_terms_option_field_value', '_give_terms_option_field_value', 10, 3);
1448 1448
 
1449 1449
 
1450 1450
 /**
@@ -1461,17 +1461,17 @@  discard block
 block discarded – undo
1461 1461
  *
1462 1462
  * @return string
1463 1463
  */
1464
-function _give_offline_donation_enable_billing_fields_single_field_value( $field_value, $field, $postid ) {
1465
-	$offline_donation = give_get_meta( $postid, '_give_offline_donation_enable_billing_fields_single', true );
1464
+function _give_offline_donation_enable_billing_fields_single_field_value($field_value, $field, $postid) {
1465
+	$offline_donation = give_get_meta($postid, '_give_offline_donation_enable_billing_fields_single', true);
1466 1466
 
1467
-	if ( 'on' === $offline_donation ) {
1467
+	if ('on' === $offline_donation) {
1468 1468
 		$field_value = 'enabled';
1469 1469
 	}
1470 1470
 
1471 1471
 	return $field_value;
1472 1472
 }
1473 1473
 
1474
-add_filter( '_give_offline_donation_enable_billing_fields_single_field_value', '_give_offline_donation_enable_billing_fields_single_field_value', 10, 3 );
1474
+add_filter('_give_offline_donation_enable_billing_fields_single_field_value', '_give_offline_donation_enable_billing_fields_single_field_value', 10, 3);
1475 1475
 
1476 1476
 
1477 1477
 /**
@@ -1487,17 +1487,17 @@  discard block
 block discarded – undo
1487 1487
  *
1488 1488
  * @return string
1489 1489
  */
1490
-function _give_custom_amount_field_value( $field_value, $field, $postid ) {
1491
-	$custom_amount = give_get_meta( $postid, '_give_custom_amount', true );
1490
+function _give_custom_amount_field_value($field_value, $field, $postid) {
1491
+	$custom_amount = give_get_meta($postid, '_give_custom_amount', true);
1492 1492
 
1493
-	if ( in_array( $custom_amount, array( 'yes', 'no' ) ) ) {
1494
-		$field_value = ( 'yes' === $custom_amount ? 'enabled' : 'disabled' );
1493
+	if (in_array($custom_amount, array('yes', 'no'))) {
1494
+		$field_value = ('yes' === $custom_amount ? 'enabled' : 'disabled');
1495 1495
 	}
1496 1496
 
1497 1497
 	return $field_value;
1498 1498
 }
1499 1499
 
1500
-add_filter( '_give_custom_amount_field_value', '_give_custom_amount_field_value', 10, 3 );
1500
+add_filter('_give_custom_amount_field_value', '_give_custom_amount_field_value', 10, 3);
1501 1501
 
1502 1502
 
1503 1503
 /**
@@ -1513,17 +1513,17 @@  discard block
 block discarded – undo
1513 1513
  *
1514 1514
  * @return string
1515 1515
  */
1516
-function _give_goal_option_field_value( $field_value, $field, $postid ) {
1517
-	$goal_option = give_get_meta( $postid, '_give_goal_option', true );
1516
+function _give_goal_option_field_value($field_value, $field, $postid) {
1517
+	$goal_option = give_get_meta($postid, '_give_goal_option', true);
1518 1518
 
1519
-	if ( in_array( $goal_option, array( 'yes', 'no' ) ) ) {
1520
-		$field_value = ( 'yes' === $goal_option ? 'enabled' : 'disabled' );
1519
+	if (in_array($goal_option, array('yes', 'no'))) {
1520
+		$field_value = ('yes' === $goal_option ? 'enabled' : 'disabled');
1521 1521
 	}
1522 1522
 
1523 1523
 	return $field_value;
1524 1524
 }
1525 1525
 
1526
-add_filter( '_give_goal_option_field_value', '_give_goal_option_field_value', 10, 3 );
1526
+add_filter('_give_goal_option_field_value', '_give_goal_option_field_value', 10, 3);
1527 1527
 
1528 1528
 /**
1529 1529
  * Set value for Donation Goal --> close Form.
@@ -1539,17 +1539,17 @@  discard block
 block discarded – undo
1539 1539
  *
1540 1540
  * @return string
1541 1541
  */
1542
-function _give_close_form_when_goal_achieved_value( $field_value, $field, $postid ) {
1543
-	$close_form = give_get_meta( $postid, '_give_close_form_when_goal_achieved', true );
1542
+function _give_close_form_when_goal_achieved_value($field_value, $field, $postid) {
1543
+	$close_form = give_get_meta($postid, '_give_close_form_when_goal_achieved', true);
1544 1544
 
1545
-	if ( in_array( $close_form, array( 'yes', 'no' ) ) ) {
1546
-		$field_value = ( 'yes' === $close_form ? 'enabled' : 'disabled' );
1545
+	if (in_array($close_form, array('yes', 'no'))) {
1546
+		$field_value = ('yes' === $close_form ? 'enabled' : 'disabled');
1547 1547
 	}
1548 1548
 
1549 1549
 	return $field_value;
1550 1550
 }
1551 1551
 
1552
-add_filter( '_give_close_form_when_goal_achieved_field_value', '_give_close_form_when_goal_achieved_value', 10, 3 );
1552
+add_filter('_give_close_form_when_goal_achieved_field_value', '_give_close_form_when_goal_achieved_value', 10, 3);
1553 1553
 
1554 1554
 
1555 1555
 /**
@@ -1565,17 +1565,17 @@  discard block
 block discarded – undo
1565 1565
  *
1566 1566
  * @return string
1567 1567
  */
1568
-function _give_logged_in_only_value( $field_value, $field, $postid ) {
1569
-	$guest_donation = give_get_meta( $postid, '_give_logged_in_only', true );
1568
+function _give_logged_in_only_value($field_value, $field, $postid) {
1569
+	$guest_donation = give_get_meta($postid, '_give_logged_in_only', true);
1570 1570
 
1571
-	if ( in_array( $guest_donation, array( 'yes', 'no' ) ) ) {
1572
-		$field_value = ( 'yes' === $guest_donation ? 'enabled' : 'disabled' );
1571
+	if (in_array($guest_donation, array('yes', 'no'))) {
1572
+		$field_value = ('yes' === $guest_donation ? 'enabled' : 'disabled');
1573 1573
 	}
1574 1574
 
1575 1575
 	return $field_value;
1576 1576
 }
1577 1577
 
1578
-add_filter( '_give_logged_in_only_field_value', '_give_logged_in_only_value', 10, 3 );
1578
+add_filter('_give_logged_in_only_field_value', '_give_logged_in_only_value', 10, 3);
1579 1579
 
1580 1580
 /**
1581 1581
  * Set value for Offline Donations --> Offline Donations.
@@ -1591,17 +1591,17 @@  discard block
 block discarded – undo
1591 1591
  *
1592 1592
  * @return string
1593 1593
  */
1594
-function _give_customize_offline_donations_value( $field_value, $field, $postid ) {
1595
-	$customize_offline_text = give_get_meta( $postid, '_give_customize_offline_donations', true );
1594
+function _give_customize_offline_donations_value($field_value, $field, $postid) {
1595
+	$customize_offline_text = give_get_meta($postid, '_give_customize_offline_donations', true);
1596 1596
 
1597
-	if ( in_array( $customize_offline_text, array( 'yes', 'no' ) ) ) {
1598
-		$field_value = ( 'yes' === $customize_offline_text ? 'enabled' : 'disabled' );
1597
+	if (in_array($customize_offline_text, array('yes', 'no'))) {
1598
+		$field_value = ('yes' === $customize_offline_text ? 'enabled' : 'disabled');
1599 1599
 	}
1600 1600
 
1601 1601
 	return $field_value;
1602 1602
 }
1603 1603
 
1604
-add_filter( '_give_customize_offline_donations_field_value', '_give_customize_offline_donations_value', 10, 3 );
1604
+add_filter('_give_customize_offline_donations_field_value', '_give_customize_offline_donations_value', 10, 3);
1605 1605
 
1606 1606
 
1607 1607
 /**
@@ -1616,14 +1616,14 @@  discard block
 block discarded – undo
1616 1616
  *
1617 1617
  * @return mixed
1618 1618
  */
1619
-function _give_set_multi_level_repeater_field_id( $field_id, $field, $fields, $default ) {
1619
+function _give_set_multi_level_repeater_field_id($field_id, $field, $fields, $default) {
1620 1620
 	$row_placeholder = false !== $default ? $default : '{{row-count-placeholder}}';
1621 1621
 	$field_id        = "{$fields['id']}[{$row_placeholder}][{$field['id']}][level_id]";
1622 1622
 
1623 1623
 	return $field_id;
1624 1624
 }
1625 1625
 
1626
-add_filter( 'give_get_repeater_field__give_id_id', '_give_set_multi_level_repeater_field_id', 10, 4 );
1626
+add_filter('give_get_repeater_field__give_id_id', '_give_set_multi_level_repeater_field_id', 10, 4);
1627 1627
 
1628 1628
 /**
1629 1629
  * Set repeater field value for multi donation form.
@@ -1637,13 +1637,13 @@  discard block
 block discarded – undo
1637 1637
  *
1638 1638
  * @return mixed
1639 1639
  */
1640
-function _give_set_multi_level_repeater_field_value( $field_value, $field, $field_group, $fields ) {
1641
-	$field_value = $field_group[ $field['id'] ]['level_id'];
1640
+function _give_set_multi_level_repeater_field_value($field_value, $field, $field_group, $fields) {
1641
+	$field_value = $field_group[$field['id']]['level_id'];
1642 1642
 
1643 1643
 	return $field_value;
1644 1644
 }
1645 1645
 
1646
-add_filter( 'give_get_repeater_field__give_id_value', '_give_set_multi_level_repeater_field_value', 10, 4 );
1646
+add_filter('give_get_repeater_field__give_id_value', '_give_set_multi_level_repeater_field_value', 10, 4);
1647 1647
 
1648 1648
 /**
1649 1649
  * Set default value for _give_id field.
@@ -1654,11 +1654,11 @@  discard block
 block discarded – undo
1654 1654
  *
1655 1655
  * @return string
1656 1656
  */
1657
-function _give_set_field_give_id_default_value( $field ) {
1657
+function _give_set_field_give_id_default_value($field) {
1658 1658
 	return 0;
1659 1659
 }
1660 1660
 
1661
-add_filter( 'give_default_field_group_field__give_id_value', '_give_set_field_give_id_default_value' );
1661
+add_filter('give_default_field_group_field__give_id_value', '_give_set_field_give_id_default_value');
1662 1662
 
1663 1663
 /**
1664 1664
  * Set default value for _give_default field.
@@ -1669,11 +1669,11 @@  discard block
 block discarded – undo
1669 1669
  *
1670 1670
  * @return string
1671 1671
  */
1672
-function _give_set_field_give_default_default_value( $field ) {
1672
+function _give_set_field_give_default_default_value($field) {
1673 1673
 	return 'default';
1674 1674
 }
1675 1675
 
1676
-add_filter( 'give_default_field_group_field__give_default_value', '_give_set_field_give_default_default_value' );
1676
+add_filter('give_default_field_group_field__give_default_value', '_give_set_field_give_default_default_value');
1677 1677
 
1678 1678
 /**
1679 1679
  * Set repeater field editor id for field type wysiwyg.
@@ -1685,15 +1685,15 @@  discard block
 block discarded – undo
1685 1685
  *
1686 1686
  * @return string
1687 1687
  */
1688
-function give_repeater_field_set_editor_id( $field_name, $field ) {
1689
-	if ( isset( $field['repeatable_field_id'] ) && 'wysiwyg' == $field['type'] ) {
1690
-		$field_name = '_give_repeater_' . uniqid() . '_wysiwyg';
1688
+function give_repeater_field_set_editor_id($field_name, $field) {
1689
+	if (isset($field['repeatable_field_id']) && 'wysiwyg' == $field['type']) {
1690
+		$field_name = '_give_repeater_'.uniqid().'_wysiwyg';
1691 1691
 	}
1692 1692
 
1693 1693
 	return $field_name;
1694 1694
 }
1695 1695
 
1696
-add_filter( 'give_get_field_name', 'give_repeater_field_set_editor_id', 10, 2 );
1696
+add_filter('give_get_field_name', 'give_repeater_field_set_editor_id', 10, 2);
1697 1697
 
1698 1698
 /**
1699 1699
  * Output Donation form radio input box.
@@ -1718,45 +1718,45 @@  discard block
 block discarded – undo
1718 1718
  * }
1719 1719
  * @return void
1720 1720
  */
1721
-function give_donation_form_goal( $field ) {
1721
+function give_donation_form_goal($field) {
1722 1722
 	global $thepostid, $post;
1723 1723
 
1724
-	$thepostid              = empty( $thepostid ) ? $post->ID : $thepostid;
1725
-	$field['style']         = isset( $field['style'] ) ? $field['style'] : '';
1726
-	$field['wrapper_class'] = isset( $field['wrapper_class'] ) ? $field['wrapper_class'] : '';
1727
-	$field['value']         = give_get_field_value( $field, $thepostid );
1728
-	$field['name']          = isset( $field['name'] ) ? $field['name'] : $field['id'];
1724
+	$thepostid              = empty($thepostid) ? $post->ID : $thepostid;
1725
+	$field['style']         = isset($field['style']) ? $field['style'] : '';
1726
+	$field['wrapper_class'] = isset($field['wrapper_class']) ? $field['wrapper_class'] : '';
1727
+	$field['value']         = give_get_field_value($field, $thepostid);
1728
+	$field['name']          = isset($field['name']) ? $field['name'] : $field['id'];
1729 1729
 
1730 1730
 
1731 1731
 	printf(
1732 1732
 		'<fieldset class="give-field-wrap %s_field %s">',
1733
-		esc_attr( $field['id'] ),
1734
-		esc_attr( $field['wrapper_class'] )
1733
+		esc_attr($field['id']),
1734
+		esc_attr($field['wrapper_class'])
1735 1735
 	);
1736 1736
 
1737 1737
 	printf(
1738 1738
 		'<span class="give-field-label">%s</span>',
1739
-		esc_html( $field['name'] )
1739
+		esc_html($field['name'])
1740 1740
 	);
1741 1741
 
1742 1742
 	printf(
1743 1743
 		'<legend class="screen-reader-text">%s</legend>',
1744
-		esc_html( $field['name'] )
1744
+		esc_html($field['name'])
1745 1745
 	);
1746 1746
 	?>
1747 1747
 
1748 1748
     <ul class="give-radios">
1749 1749
 		<?php
1750
-		foreach ( $field['options'] as $key => $value ) {
1751
-			$attributes = empty( $field['attributes'] ) ? '' : give_get_attribute_str( $field['attributes'] );
1750
+		foreach ($field['options'] as $key => $value) {
1751
+			$attributes = empty($field['attributes']) ? '' : give_get_attribute_str($field['attributes']);
1752 1752
 			printf(
1753 1753
 				'<li><label><input name="%s" value="%s" type="radio" style="%s" %s %s /> %s </label></li>',
1754
-				give_get_field_name( $field ),
1755
-				esc_attr( $key ),
1756
-				esc_attr( $field['style'] ),
1757
-				checked( esc_attr( $field['value'] ), esc_attr( $key ), false ),
1754
+				give_get_field_name($field),
1755
+				esc_attr($key),
1756
+				esc_attr($field['style']),
1757
+				checked(esc_attr($field['value']), esc_attr($key), false),
1758 1758
 				$attributes,
1759
-				esc_html( $value )
1759
+				esc_html($value)
1760 1760
 			);
1761 1761
 		}
1762 1762
 		?>
@@ -1770,9 +1770,9 @@  discard block
 block discarded – undo
1770 1770
 	 *
1771 1771
 	 * @param array $field Array of radio field arguments.
1772 1772
 	 */
1773
-	do_action( 'give_donation_form_goal_before_description', $field );
1773
+	do_action('give_donation_form_goal_before_description', $field);
1774 1774
 
1775
-	echo give_get_field_description( $field );
1775
+	echo give_get_field_description($field);
1776 1776
 
1777 1777
 	echo '</fieldset>';
1778 1778
 }
1779 1779
\ No newline at end of file
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
@@ -60,7 +60,12 @@  discard block
 block discarded – undo
60 60
 		<tr>
61 61
 			<td data-export-label="WP Multisite"><?php _e( 'WP Multisite', 'give' ); ?>:</td>
62 62
 			<td class="help"><?php echo Give()->tooltips->render_help( __( 'Whether or not you have WordPress Multisite enabled.', 'give' ) ); ?></td>
63
-			<td><?php if ( is_multisite() ) echo '<span class="dashicons dashicons-yes"></span>'; else echo '&ndash;'; ?></td>
63
+			<td><?php if ( is_multisite() ) {
64
+	echo '<span class="dashicons dashicons-yes"></span>';
65
+} else {
66
+	echo '&ndash;';
67
+}
68
+?></td>
64 69
 
65 70
 		</tr>
66 71
 		<tr>
@@ -89,9 +94,12 @@  discard block
 block discarded – undo
89 94
 			<td>
90 95
 				<?php if ( defined( 'WP_DEBUG' ) && WP_DEBUG ) : ?>
91 96
 					<mark class="yes"><span class="dashicons dashicons-yes"></span></mark>
92
-				<?php else : ?>
97
+				<?php else {
98
+	: ?>
93 99
 					<mark class="no">&ndash;</mark>
94
-				<?php endif; ?>
100
+				<?php endif;
101
+}
102
+?>
95 103
 			</td>
96 104
 		</tr>
97 105
 		<tr>
@@ -100,9 +108,12 @@  discard block
 block discarded – undo
100 108
 			<td>
101 109
 				<?php if ( defined( 'DISABLE_WP_CRON' ) && DISABLE_WP_CRON ) : ?>
102 110
 					<mark class="no">&ndash;</mark>
103
-				<?php else : ?>
111
+				<?php else {
112
+	: ?>
104 113
 					<mark class="yes"><span class="dashicons dashicons-yes"></span></mark>
105
-				<?php endif; ?>
114
+				<?php endif;
115
+}
116
+?>
106 117
 			</td>
107 118
 		</tr>
108 119
 		<tr>
Please login to merge, or discard this patch.
Spacing   +350 added lines, -351 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
 
@@ -25,10 +25,10 @@  discard block
 block discarded – undo
25 25
 ?>
26 26
 
27 27
 <div class="give-debug-report-wrapper">
28
-	<p class="give-debug-report-text"><?php echo sprintf(__( 'Please copy and paste this information in your ticket when contacting support:', 'give' )); ?> </p>
28
+	<p class="give-debug-report-text"><?php echo sprintf(__('Please copy and paste this information in your ticket when contacting support:', 'give')); ?> </p>
29 29
 	<div class="give-debug-report-actions">
30
-		<a class="button-primary js-give-debug-report-button" href="#"><?php _e( 'Get System Report', 'give' ); ?></a>
31
-		<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>
30
+		<a class="button-primary js-give-debug-report-button" href="#"><?php _e('Get System Report', 'give'); ?></a>
31
+		<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>
32 32
 	</div>
33 33
 	<div class="give-debug-report js-give-debug-report">
34 34
 		<textarea readonly="readonly"></textarea>
@@ -38,56 +38,56 @@  discard block
 block discarded – undo
38 38
 <table class="give-status-table widefat" cellspacing="0" id="status">
39 39
 	<thead>
40 40
 		<tr>
41
-			<th colspan="3" data-export-label="WordPress Environment"><h2><?php _e( 'WordPress Environment', 'give' ); ?></h2></th>
41
+			<th colspan="3" data-export-label="WordPress Environment"><h2><?php _e('WordPress Environment', 'give'); ?></h2></th>
42 42
 		</tr>
43 43
 	</thead>
44 44
 	<tbody>
45 45
 		<tr>
46
-			<td data-export-label="Home URL"><?php _e( 'Home URL', 'give' ); ?>:</td>
47
-			<td class="help"><?php echo Give()->tooltips->render_help( __( 'The URL of your site\'s homepage.', 'give' ) ); ?></td>
48
-			<td><?php form_option( 'home' ); ?></td>
46
+			<td data-export-label="Home URL"><?php _e('Home URL', 'give'); ?>:</td>
47
+			<td class="help"><?php echo Give()->tooltips->render_help(__('The URL of your site\'s homepage.', 'give')); ?></td>
48
+			<td><?php form_option('home'); ?></td>
49 49
 		</tr>
50 50
 		<tr>
51
-			<td data-export-label="Site URL"><?php _e( 'Site URL', 'give' ); ?>:</td>
52
-			<td class="help"><?php echo Give()->tooltips->render_help( __( 'The root URL of your site.', 'give' ) ); ?></td>
53
-			<td><?php form_option( 'siteurl' ); ?></td>
51
+			<td data-export-label="Site URL"><?php _e('Site URL', 'give'); ?>:</td>
52
+			<td class="help"><?php echo Give()->tooltips->render_help(__('The root URL of your site.', 'give')); ?></td>
53
+			<td><?php form_option('siteurl'); ?></td>
54 54
 		</tr>
55 55
 		<tr>
56
-			<td data-export-label="WP Version"><?php _e( 'WP Version', 'give' ); ?>:</td>
57
-			<td class="help"><?php echo Give()->tooltips->render_help(  __( 'The version of WordPress installed on your site.', 'give' ) ); ?></td>
58
-			<td><?php bloginfo( 'version' ); ?></td>
56
+			<td data-export-label="WP Version"><?php _e('WP Version', 'give'); ?>:</td>
57
+			<td class="help"><?php echo Give()->tooltips->render_help(__('The version of WordPress installed on your site.', 'give')); ?></td>
58
+			<td><?php bloginfo('version'); ?></td>
59 59
 		</tr>
60 60
 		<tr>
61
-			<td data-export-label="WP Multisite"><?php _e( 'WP Multisite', 'give' ); ?>:</td>
62
-			<td class="help"><?php echo Give()->tooltips->render_help( __( 'Whether or not you have WordPress Multisite enabled.', 'give' ) ); ?></td>
63
-			<td><?php if ( is_multisite() ) echo '<span class="dashicons dashicons-yes"></span>'; else echo '&ndash;'; ?></td>
61
+			<td data-export-label="WP Multisite"><?php _e('WP Multisite', 'give'); ?>:</td>
62
+			<td class="help"><?php echo Give()->tooltips->render_help(__('Whether or not you have WordPress Multisite enabled.', 'give')); ?></td>
63
+			<td><?php if (is_multisite()) echo '<span class="dashicons dashicons-yes"></span>'; else echo '&ndash;'; ?></td>
64 64
 
65 65
 		</tr>
66 66
 		<tr>
67
-			<td data-export-label="WP Memory Limit"><?php _e( 'WP Memory Limit', 'give' ); ?>:</td>
68
-			<td class="help"><?php echo Give()->tooltips->render_help( __( 'The maximum amount of memory (RAM) that your site can use at one time.', 'give' ) ); ?></td>
67
+			<td data-export-label="WP Memory Limit"><?php _e('WP Memory Limit', 'give'); ?>:</td>
68
+			<td class="help"><?php echo Give()->tooltips->render_help(__('The maximum amount of memory (RAM) that your site can use at one time.', 'give')); ?></td>
69 69
 			<td>
70 70
 				<?php
71
-				$memory = give_let_to_num( WP_MEMORY_LIMIT );
71
+				$memory = give_let_to_num(WP_MEMORY_LIMIT);
72 72
 
73
-				if ( function_exists( 'memory_get_usage' ) ) {
74
-					$system_memory = give_let_to_num( @ini_get( 'memory_limit' ) );
75
-					$memory        = max( $memory, $system_memory );
73
+				if (function_exists('memory_get_usage')) {
74
+					$system_memory = give_let_to_num(@ini_get('memory_limit'));
75
+					$memory        = max($memory, $system_memory);
76 76
 				}
77 77
 
78
-				if ( $memory < 67108864 ) {
79
-					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>';
78
+				if ($memory < 67108864) {
79
+					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>';
80 80
 				} else {
81
-					echo '<mark class="yes">' . size_format( $memory ) . '</mark>';
81
+					echo '<mark class="yes">'.size_format($memory).'</mark>';
82 82
 				}
83 83
 				?>
84 84
 			</td>
85 85
 		</tr>
86 86
 		<tr>
87
-			<td data-export-label="WP Debug Mode"><?php _e( 'WP Debug Mode', 'give' ); ?>:</td>
88
-			<td class="help"><?php echo Give()->tooltips->render_help( __( 'Displays whether or not WordPress is in Debug Mode.', 'give' ) ); ?></td>
87
+			<td data-export-label="WP Debug Mode"><?php _e('WP Debug Mode', 'give'); ?>:</td>
88
+			<td class="help"><?php echo Give()->tooltips->render_help(__('Displays whether or not WordPress is in Debug Mode.', 'give')); ?></td>
89 89
 			<td>
90
-				<?php if ( defined( 'WP_DEBUG' ) && WP_DEBUG ) : ?>
90
+				<?php if (defined('WP_DEBUG') && WP_DEBUG) : ?>
91 91
 					<mark class="yes"><span class="dashicons dashicons-yes"></span></mark>
92 92
 				<?php else : ?>
93 93
 					<mark class="no">&ndash;</mark>
@@ -95,10 +95,10 @@  discard block
 block discarded – undo
95 95
 			</td>
96 96
 		</tr>
97 97
 		<tr>
98
-			<td data-export-label="WP Cron"><?php _e( 'WP Cron', 'give' ); ?>:</td>
99
-			<td class="help"><?php echo Give()->tooltips->render( __( 'Displays whether or not WP Cron Jobs are enabled.', 'give' ) ); ?></td>
98
+			<td data-export-label="WP Cron"><?php _e('WP Cron', 'give'); ?>:</td>
99
+			<td class="help"><?php echo Give()->tooltips->render(__('Displays whether or not WP Cron Jobs are enabled.', 'give')); ?></td>
100 100
 			<td>
101
-				<?php if ( defined( 'DISABLE_WP_CRON' ) && DISABLE_WP_CRON ) : ?>
101
+				<?php if (defined('DISABLE_WP_CRON') && DISABLE_WP_CRON) : ?>
102 102
 					<mark class="no">&ndash;</mark>
103 103
 				<?php else : ?>
104 104
 					<mark class="yes"><span class="dashicons dashicons-yes"></span></mark>
@@ -106,60 +106,60 @@  discard block
 block discarded – undo
106 106
 			</td>
107 107
 		</tr>
108 108
 		<tr>
109
-			<td data-export-label="Language"><?php _e( 'Language', 'give' ); ?>:</td>
110
-			<td class="help"><?php echo Give()->tooltips->render_help( __( 'The current language used by WordPress. Default = English', 'give' ) ); ?></td>
109
+			<td data-export-label="Language"><?php _e('Language', 'give'); ?>:</td>
110
+			<td class="help"><?php echo Give()->tooltips->render_help(__('The current language used by WordPress. Default = English', 'give')); ?></td>
111 111
 			<td><?php echo get_locale(); ?></td>
112 112
 		</tr>
113 113
 		<tr>
114
-			<td data-export-label="Permalink Structure"><?php _e( 'Permalink Structure', 'give' ); ?>:</td>
115
-			<td class="help"><?php echo Give()->tooltips->render_help( __( 'The permalink structure as defined in Settings.', 'give' ) ); ?></td>
116
-			<td><?php echo esc_html( get_option( 'permalink_structure', __( 'Default', 'give' ) ) ); ?></td>
114
+			<td data-export-label="Permalink Structure"><?php _e('Permalink Structure', 'give'); ?>:</td>
115
+			<td class="help"><?php echo Give()->tooltips->render_help(__('The permalink structure as defined in Settings.', 'give')); ?></td>
116
+			<td><?php echo esc_html(get_option('permalink_structure', __('Default', 'give'))); ?></td>
117 117
 		</tr>
118 118
 		<tr>
119
-			<td data-export-label="Show on Front"><?php _e( 'Show on Front', 'give' ); ?>:</td>
120
-			<td class="help"><?php echo Give()->tooltips->render_help( __( 'Whether your front page is set to show posts or a static page.', 'give' ) ); ?></td>
121
-			<td><?php echo esc_html( get_option( 'show_on_front', '&ndash;' ) ); ?></td>
119
+			<td data-export-label="Show on Front"><?php _e('Show on Front', 'give'); ?>:</td>
120
+			<td class="help"><?php echo Give()->tooltips->render_help(__('Whether your front page is set to show posts or a static page.', 'give')); ?></td>
121
+			<td><?php echo esc_html(get_option('show_on_front', '&ndash;')); ?></td>
122 122
 		</tr>
123
-		<?php if ( 'page' === get_option( 'show_on_front' ) ) : ?>
123
+		<?php if ('page' === get_option('show_on_front')) : ?>
124 124
 			<?php
125
-			$front_page_id = absint( get_option( 'page_on_front' ) );
126
-			$blog_page_id  = absint( get_option( 'page_for_posts' ) );
125
+			$front_page_id = absint(get_option('page_on_front'));
126
+			$blog_page_id  = absint(get_option('page_for_posts'));
127 127
 			?>
128 128
 			<tr>
129
-				<td data-export-label="Page on Front"><?php _e( 'Page on Front', 'give' ); ?>:</td>
130
-				<td class="help"><?php echo Give()->tooltips->render_help( __( 'The page set to display as your front page.', 'give' ) ); ?></td>
131
-				<td><?php echo 0 !== $front_page_id ? esc_html( get_the_title( $front_page_id ) . ' (#' . $front_page_id . ')' ) : __( 'Unset', 'give' ); ?></td>
129
+				<td data-export-label="Page on Front"><?php _e('Page on Front', 'give'); ?>:</td>
130
+				<td class="help"><?php echo Give()->tooltips->render_help(__('The page set to display as your front page.', 'give')); ?></td>
131
+				<td><?php echo 0 !== $front_page_id ? esc_html(get_the_title($front_page_id).' (#'.$front_page_id.')') : __('Unset', 'give'); ?></td>
132 132
 			</tr>
133 133
 			<tr>
134
-				<td data-export-label="Page for Posts"><?php _e( 'Page for Posts', 'give' ); ?>:</td>
135
-				<td class="help"><?php echo Give()->tooltips->render_help( __( 'The page set to display your posts.', 'give' ) ); ?></td>
136
-				<td><?php echo 0 !== $blog_page_id ? esc_html( get_the_title( $blog_page_id ) . ' (#' . $blog_page_id . ')' ) : __( 'Unset', 'give' ); ?></td>
134
+				<td data-export-label="Page for Posts"><?php _e('Page for Posts', 'give'); ?>:</td>
135
+				<td class="help"><?php echo Give()->tooltips->render_help(__('The page set to display your posts.', 'give')); ?></td>
136
+				<td><?php echo 0 !== $blog_page_id ? esc_html(get_the_title($blog_page_id).' (#'.$blog_page_id.')') : __('Unset', 'give'); ?></td>
137 137
 			</tr>
138
-		<?php endif;?>
138
+		<?php endif; ?>
139 139
 		<tr>
140
-			<td data-export-label="Table Prefix Length"><?php _e( 'Table Prefix', 'give' ); ?>:</td>
141
-			<td class="help"><?php echo Give()->tooltips->render_help( __( 'The table prefix used in your WordPress database.', 'give' ) ); ?></td>
142
-			<td><?php echo esc_html( $wpdb->prefix ); ?></td>
140
+			<td data-export-label="Table Prefix Length"><?php _e('Table Prefix', 'give'); ?>:</td>
141
+			<td class="help"><?php echo Give()->tooltips->render_help(__('The table prefix used in your WordPress database.', 'give')); ?></td>
142
+			<td><?php echo esc_html($wpdb->prefix); ?></td>
143 143
 		</tr>
144 144
 		<tr>
145
-			<td data-export-label="Table Prefix Length"><?php _e( 'Table Prefix Length', 'give' ); ?>:</td>
146
-			<td class="help"><?php echo Give()->tooltips->render_help( __( 'The length of the table prefix used in your WordPress database.', 'give' ) ); ?></td>
147
-			<td><?php echo esc_html( strlen( $wpdb->prefix ) ); ?></td>
145
+			<td data-export-label="Table Prefix Length"><?php _e('Table Prefix Length', 'give'); ?>:</td>
146
+			<td class="help"><?php echo Give()->tooltips->render_help(__('The length of the table prefix used in your WordPress database.', 'give')); ?></td>
147
+			<td><?php echo esc_html(strlen($wpdb->prefix)); ?></td>
148 148
 		</tr>
149 149
 		<tr>
150
-			<td data-export-label="Table Prefix Status"><?php _e( 'Table Prefix Status', 'give' ); ?>:</td>
151
-			<td class="help"><?php echo Give()->tooltips->render_help( __( 'The status of the table prefix used in your WordPress database.', 'give' ) ); ?></td>
152
-			<td><?php echo strlen( $wpdb->prefix ) > 16 ? esc_html( 'Error: Too long', 'give' ) : esc_html( 'Acceptable', 'give' ); ?></td>
150
+			<td data-export-label="Table Prefix Status"><?php _e('Table Prefix Status', 'give'); ?>:</td>
151
+			<td class="help"><?php echo Give()->tooltips->render_help(__('The status of the table prefix used in your WordPress database.', 'give')); ?></td>
152
+			<td><?php echo strlen($wpdb->prefix) > 16 ? esc_html('Error: Too long', 'give') : esc_html('Acceptable', 'give'); ?></td>
153 153
 		</tr>
154 154
 		<tr>
155
-			<td data-export-label="Admin AJAX"><?php _e( 'Admin AJAX', 'give' ); ?>:</td>
156
-			<td class="help"><?php echo Give()->tooltips->render_help( __( 'Whether Admin AJAX is accessible.', 'give' ) ); ?></td>
157
-			<td><?php echo give_test_ajax_works() ? __( 'Accessible', 'give' ) : __( 'Inaccessible', 'give' ); ?></td>
155
+			<td data-export-label="Admin AJAX"><?php _e('Admin AJAX', 'give'); ?>:</td>
156
+			<td class="help"><?php echo Give()->tooltips->render_help(__('Whether Admin AJAX is accessible.', 'give')); ?></td>
157
+			<td><?php echo give_test_ajax_works() ? __('Accessible', 'give') : __('Inaccessible', 'give'); ?></td>
158 158
 		</tr>
159 159
 		<tr>
160
-			<td data-export-label="Registered Post Statuses"><?php _e( 'Registered Post Statuses', 'give' ); ?>:</td>
161
-			<td class="help"><?php echo Give()->tooltips->render_help( __( 'A list of all registered post statuses.', 'give' ) ); ?></td>
162
-			<td><?php echo esc_html( implode( ', ', get_post_stati() ) ); ?></td>
160
+			<td data-export-label="Registered Post Statuses"><?php _e('Registered Post Statuses', 'give'); ?>:</td>
161
+			<td class="help"><?php echo Give()->tooltips->render_help(__('A list of all registered post statuses.', 'give')); ?></td>
162
+			<td><?php echo esc_html(implode(', ', get_post_stati())); ?></td>
163 163
 		</tr>
164 164
 	</tbody>
165 165
 </table>
@@ -167,103 +167,103 @@  discard block
 block discarded – undo
167 167
 <table class="give-status-table widefat" cellspacing="0">
168 168
 	<thead>
169 169
 		<tr>
170
-			<th colspan="3" data-export-label="Server Environment"><h2><?php _e( 'Server Environment', 'give' ); ?></h2></th>
170
+			<th colspan="3" data-export-label="Server Environment"><h2><?php _e('Server Environment', 'give'); ?></h2></th>
171 171
 		</tr>
172 172
 	</thead>
173 173
 	<tbody>
174 174
 		<tr>
175
-			<td data-export-label="Hosting Provider"><?php _e( 'Hosting Provider', 'give' ); ?>:</td>
176
-			<td class="help"><?php echo Give()->tooltips->render_help( __( 'The hosting provider for this WordPress installation.', 'give' ) ); ?></td>
177
-			<td><?php echo give_get_host() ? esc_html( give_get_host() ) : __( 'Unknown', 'give' ); ?></td>
175
+			<td data-export-label="Hosting Provider"><?php _e('Hosting Provider', 'give'); ?>:</td>
176
+			<td class="help"><?php echo Give()->tooltips->render_help(__('The hosting provider for this WordPress installation.', 'give')); ?></td>
177
+			<td><?php echo give_get_host() ? esc_html(give_get_host()) : __('Unknown', 'give'); ?></td>
178 178
 		</tr>
179 179
 		<tr>
180
-			<td data-export-label="TLS Connection"><?php _e( 'TLS Connection', 'give' ); ?>:</td>
181
-			<td class="help"><?php echo Give()->tooltips->render_help( __( 'Most payment gateway APIs only support connections using the TLS 1.2 security protocol.', 'give' ) ); ?></td>
180
+			<td data-export-label="TLS Connection"><?php _e('TLS Connection', 'give'); ?>:</td>
181
+			<td class="help"><?php echo Give()->tooltips->render_help(__('Most payment gateway APIs only support connections using the TLS 1.2 security protocol.', 'give')); ?></td>
182 182
 			<td>
183 183
 				<?php
184 184
 				$tls_check = false;
185 185
 
186 186
 				// Get the SSL status.
187
-				if ( ini_get( 'allow_url_fopen' ) ) {
188
-					$tls_check = file_get_contents( 'https://www.howsmyssl.com/a/check' );
187
+				if (ini_get('allow_url_fopen')) {
188
+					$tls_check = file_get_contents('https://www.howsmyssl.com/a/check');
189 189
 				}
190 190
 
191
-				if ( false !== $tls_check ) {
192
-					$tls_check = json_decode( $tls_check );
191
+				if (false !== $tls_check) {
192
+					$tls_check = json_decode($tls_check);
193 193
 					/* translators: %s: SSL connection response */
194
-					printf( __( 'Connection uses %s', 'give' ), esc_html( $tls_check->tls_version ) );
194
+					printf(__('Connection uses %s', 'give'), esc_html($tls_check->tls_version));
195 195
 				}
196 196
 				?>
197 197
 			</td>
198 198
 		</tr>
199 199
 		<tr>
200
-			<td data-export-label="TLS Connection"><?php _e( 'TLS Rating', 'give' ); ?>:</td>
201
-			<td class="help"><?php echo Give()->tooltips->render_help( __( 'The server\'s connection as rated by https://www.howsmyssl.com/', 'give' ) ); ?></td>
200
+			<td data-export-label="TLS Connection"><?php _e('TLS Rating', 'give'); ?>:</td>
201
+			<td class="help"><?php echo Give()->tooltips->render_help(__('The server\'s connection as rated by https://www.howsmyssl.com/', 'give')); ?></td>
202 202
 			<td>
203 203
 				<?php
204
-				if ( false !== $tls_check ) {
205
-					esc_html_e( property_exists( $tls_check, 'rating' ) ? $tls_check->rating : $tls_check->tls_version );
204
+				if (false !== $tls_check) {
205
+					esc_html_e(property_exists($tls_check, 'rating') ? $tls_check->rating : $tls_check->tls_version);
206 206
 				}
207 207
 				?>
208 208
 			</td>
209 209
 		</tr>
210 210
 		<tr>
211
-			<td data-export-label="Server Info"><?php _e( 'Server Info', 'give' ); ?>:</td>
212
-			<td class="help"><?php echo Give()->tooltips->render_help( __( 'Information about the web server that is currently hosting your site.', 'give' ) ); ?></td>
213
-			<td><?php echo esc_html( $_SERVER['SERVER_SOFTWARE'] ); ?></td>
211
+			<td data-export-label="Server Info"><?php _e('Server Info', 'give'); ?>:</td>
212
+			<td class="help"><?php echo Give()->tooltips->render_help(__('Information about the web server that is currently hosting your site.', 'give')); ?></td>
213
+			<td><?php echo esc_html($_SERVER['SERVER_SOFTWARE']); ?></td>
214 214
 		</tr>
215 215
 		<tr>
216
-			<td data-export-label="PHP Version"><?php _e( 'PHP Version', 'give' ); ?>:</td>
217
-			<td class="help"><?php echo Give()->tooltips->render_help( __( 'The version of PHP installed on your hosting server.', 'give' ) ); ?></td>
216
+			<td data-export-label="PHP Version"><?php _e('PHP Version', 'give'); ?>:</td>
217
+			<td class="help"><?php echo Give()->tooltips->render_help(__('The version of PHP installed on your hosting server.', 'give')); ?></td>
218 218
 			<td>
219 219
 				<?php
220 220
 				// Check if phpversion function exists.
221
-				if ( function_exists( 'phpversion' ) ) {
221
+				if (function_exists('phpversion')) {
222 222
 					$php_version = phpversion();
223 223
 
224
-					if ( version_compare( $php_version, '5.6', '<' ) ) {
225
-						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>';
224
+					if (version_compare($php_version, '5.6', '<')) {
225
+						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>';
226 226
 					} else {
227
-						echo '<mark class="yes">' . esc_html( $php_version ) . '</mark>';
227
+						echo '<mark class="yes">'.esc_html($php_version).'</mark>';
228 228
 					}
229 229
 				} else {
230
-					_e( "Couldn't determine PHP version because phpversion() doesn't exist.", 'give' );
230
+					_e("Couldn't determine PHP version because phpversion() doesn't exist.", 'give');
231 231
 				}
232 232
 				?></td>
233 233
 		</tr>
234
-		<?php if ( function_exists( 'ini_get' ) ) : ?>
234
+		<?php if (function_exists('ini_get')) : ?>
235 235
 			<tr>
236
-				<td data-export-label="PHP Post Max Size"><?php _e( 'PHP Post Max Size', 'give' ); ?>:</td>
237
-				<td class="help"><?php echo Give()->tooltips->render_help( __( 'The largest filesize that can be contained in one post.', 'give' ) ); ?></td>
238
-				<td><?php echo size_format( give_let_to_num( ini_get( 'post_max_size' ) ) ); ?></td>
236
+				<td data-export-label="PHP Post Max Size"><?php _e('PHP Post Max Size', 'give'); ?>:</td>
237
+				<td class="help"><?php echo Give()->tooltips->render_help(__('The largest filesize that can be contained in one post.', 'give')); ?></td>
238
+				<td><?php echo size_format(give_let_to_num(ini_get('post_max_size'))); ?></td>
239 239
 			</tr>
240 240
 			<tr>
241
-				<td data-export-label="PHP Time Limit"><?php _e( 'PHP Time Limit', 'give' ); ?>:</td>
242
-				<td class="help"><?php echo Give() ->tooltips->render_help( __( 'The amount of time (in seconds) that your site will spend on a single operation before timing out (to avoid server lockups).', 'give' ) ); ?></td>
243
-				<td><?php echo ini_get( 'max_execution_time' ); ?></td>
241
+				<td data-export-label="PHP Time Limit"><?php _e('PHP Time Limit', 'give'); ?>:</td>
242
+				<td class="help"><?php echo Give() ->tooltips->render_help(__('The amount of time (in seconds) that your site will spend on a single operation before timing out (to avoid server lockups).', 'give')); ?></td>
243
+				<td><?php echo ini_get('max_execution_time'); ?></td>
244 244
 			</tr>
245 245
 			<tr>
246
-				<td data-export-label="PHP Max Input Vars"><?php _e( 'PHP Max Input Vars', 'give' ); ?>:</td>
247
-				<td class="help"><?php echo Give()->tooltips->render_help( __( 'The maximum number of variables your server can use for a single function to avoid overloads.', 'give' ) ); ?></td>
248
-				<td><?php echo ini_get( 'max_input_vars' ); ?></td>
246
+				<td data-export-label="PHP Max Input Vars"><?php _e('PHP Max Input Vars', 'give'); ?>:</td>
247
+				<td class="help"><?php echo Give()->tooltips->render_help(__('The maximum number of variables your server can use for a single function to avoid overloads.', 'give')); ?></td>
248
+				<td><?php echo ini_get('max_input_vars'); ?></td>
249 249
 			</tr>
250 250
 			<tr>
251
-				<td data-export-label="PHP Max Upload Size"><?php _e( 'PHP Max Upload Size', 'give' ); ?>:</td>
252
-				<td class="help"><?php echo Give()->tooltips->render_help( __( 'The largest filesize that can be uploaded to your WordPress installation.', 'give' ) ); ?></td>
253
-				<td><?php echo size_format( wp_max_upload_size() ); ?></td>
251
+				<td data-export-label="PHP Max Upload Size"><?php _e('PHP Max Upload Size', 'give'); ?>:</td>
252
+				<td class="help"><?php echo Give()->tooltips->render_help(__('The largest filesize that can be uploaded to your WordPress installation.', 'give')); ?></td>
253
+				<td><?php echo size_format(wp_max_upload_size()); ?></td>
254 254
 			</tr>
255 255
 			<tr>
256
-				<td data-export-label="cURL Version"><?php _e( 'cURL Version', 'give' ); ?>:</td>
257
-				<td class="help"><?php echo Give()->tooltips->render_help( __( 'The version of cURL installed on your server.', 'give' ) ); ?></td>
256
+				<td data-export-label="cURL Version"><?php _e('cURL Version', 'give'); ?>:</td>
257
+				<td class="help"><?php echo Give()->tooltips->render_help(__('The version of cURL installed on your server.', 'give')); ?></td>
258 258
 				<td>
259 259
 					<?php
260
-					if ( function_exists( 'curl_version' ) ) {
260
+					if (function_exists('curl_version')) {
261 261
 						$curl_version = curl_version();
262 262
 
263
-						if ( version_compare( $curl_version['version'], '7.40', '<' ) ) {
264
-							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>';
263
+						if (version_compare($curl_version['version'], '7.40', '<')) {
264
+							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>';
265 265
 						} else {
266
-							echo '<mark class="yes">' . esc_html( $curl_version['version'] . ', ' . $curl_version['ssl_version'] ) . '</mark>';
266
+							echo '<mark class="yes">'.esc_html($curl_version['version'].', '.$curl_version['ssl_version']).'</mark>';
267 267
 						}
268 268
 					} else {
269 269
 						echo '&ndash';
@@ -272,42 +272,42 @@  discard block
 block discarded – undo
272 272
 				</td>
273 273
 			</tr>
274 274
 			<tr>
275
-				<td data-export-label="SUHOSIN Installed"><?php _e( 'SUHOSIN Installed', 'give' ); ?>:</td>
276
-				<td class="help"><?php echo Give()->tooltips->render_help( __( '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' ) ); ?></td>
277
-				<td><?php echo extension_loaded( 'suhosin' ) ? '<span class="dashicons dashicons-yes"></span>' : '&ndash;'; ?></td>
275
+				<td data-export-label="SUHOSIN Installed"><?php _e('SUHOSIN Installed', 'give'); ?>:</td>
276
+				<td class="help"><?php echo Give()->tooltips->render_help(__('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')); ?></td>
277
+				<td><?php echo extension_loaded('suhosin') ? '<span class="dashicons dashicons-yes"></span>' : '&ndash;'; ?></td>
278 278
 			</tr>
279 279
 		<?php endif;
280 280
 
281
-		if ( $wpdb->use_mysqli ) {
282
-			$ver = mysqli_get_server_info( $wpdb->dbh );
281
+		if ($wpdb->use_mysqli) {
282
+			$ver = mysqli_get_server_info($wpdb->dbh);
283 283
 		} else {
284 284
 			$ver = mysql_get_server_info();
285 285
 		}
286 286
 
287
-		if ( ! empty( $wpdb->is_mysql ) && ! stristr( $ver, 'MariaDB' ) ) : ?>
287
+		if ( ! empty($wpdb->is_mysql) && ! stristr($ver, 'MariaDB')) : ?>
288 288
 			<tr>
289
-				<td data-export-label="MySQL Version"><?php _e( 'MySQL Version', 'give' ); ?>:</td>
290
-				<td class="help"><?php echo Give()->tooltips->render_help( __( 'The version of MySQL installed on your hosting server.', 'give' ) ); ?></td>
289
+				<td data-export-label="MySQL Version"><?php _e('MySQL Version', 'give'); ?>:</td>
290
+				<td class="help"><?php echo Give()->tooltips->render_help(__('The version of MySQL installed on your hosting server.', 'give')); ?></td>
291 291
 				<td>
292 292
 					<?php
293 293
 					$mysql_version = $wpdb->db_version();
294 294
 
295
-					if ( version_compare( $mysql_version, '5.6', '<' ) ) {
296
-						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>';
295
+					if (version_compare($mysql_version, '5.6', '<')) {
296
+						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>';
297 297
 					} else {
298
-						echo '<mark class="yes">' . esc_html( $mysql_version ) . '</mark>';
298
+						echo '<mark class="yes">'.esc_html($mysql_version).'</mark>';
299 299
 					}
300 300
 					?>
301 301
 				</td>
302 302
 			</tr>
303 303
 		<?php endif; ?>
304 304
 		<tr>
305
-			<td data-export-label="Default Timezone is UTC"><?php _e( 'Default Timezone is UTC', 'give' ); ?>:</td>
306
-			<td class="help"><?php echo Give()->tooltips->render_help( __( 'The default timezone for your server.', 'give' ) ); ?></td>
305
+			<td data-export-label="Default Timezone is UTC"><?php _e('Default Timezone is UTC', 'give'); ?>:</td>
306
+			<td class="help"><?php echo Give()->tooltips->render_help(__('The default timezone for your server.', 'give')); ?></td>
307 307
 			<td><?php
308 308
 				$default_timezone = date_default_timezone_get();
309
-				if ( 'UTC' !== $default_timezone ) {
310
-					echo '<mark class="error"><span class="dashicons dashicons-warning"></span> ' . sprintf( __( 'Default timezone is %s - it should be UTC', 'give' ), $default_timezone ) . '</mark>';
309
+				if ('UTC' !== $default_timezone) {
310
+					echo '<mark class="error"><span class="dashicons dashicons-warning"></span> '.sprintf(__('Default timezone is %s - it should be UTC', 'give'), $default_timezone).'</mark>';
311 311
 				} else {
312 312
 					echo '<mark class="yes"><span class="dashicons dashicons-yes"></span></mark>';
313 313
 				} ?>
@@ -318,119 +318,119 @@  discard block
 block discarded – undo
318 318
 
319 319
 		// fsockopen/cURL.
320 320
 		$posting['fsockopen_curl']['name'] = 'fsockopen/cURL';
321
-		$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' );
321
+		$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');
322 322
 
323
-		if ( function_exists( 'fsockopen' ) || function_exists( 'curl_init' ) ) {
323
+		if (function_exists('fsockopen') || function_exists('curl_init')) {
324 324
 			$posting['fsockopen_curl']['success'] = true;
325 325
 		} else {
326 326
 			$posting['fsockopen_curl']['success'] = false;
327
-			$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' );
327
+			$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');
328 328
 		}
329 329
 
330 330
 		// SOAP.
331 331
 		$posting['soap_client']['name'] = 'SoapClient';
332
-		$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' );
332
+		$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');
333 333
 
334
-		if ( class_exists( 'SoapClient' ) ) {
334
+		if (class_exists('SoapClient')) {
335 335
 			$posting['soap_client']['success'] = true;
336 336
 		} else {
337 337
 			$posting['soap_client']['success'] = false;
338
-			$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>' );
338
+			$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>');
339 339
 		}
340 340
 
341 341
 		// DOMDocument.
342 342
 		$posting['dom_document']['name'] = 'DOMDocument';
343
-		$posting['dom_document']['help'] = __( 'HTML/Multipart emails use DOMDocument to generate inline CSS in templates.', 'give' );
343
+		$posting['dom_document']['help'] = __('HTML/Multipart emails use DOMDocument to generate inline CSS in templates.', 'give');
344 344
 
345
-		if ( class_exists( 'DOMDocument' ) ) {
345
+		if (class_exists('DOMDocument')) {
346 346
 			$posting['dom_document']['success'] = true;
347 347
 		} else {
348 348
 			$posting['dom_document']['success'] = false;
349
-			$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>' );
349
+			$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>');
350 350
 		}
351 351
 
352 352
 		// gzip.
353 353
 		$posting['gzip']['name'] = 'gzip';
354
-		$posting['gzip']['help'] = __( 'gzip is used for file compression and decompression.', 'give' );
354
+		$posting['gzip']['help'] = __('gzip is used for file compression and decompression.', 'give');
355 355
 
356
-		if ( is_callable( 'gzopen' ) ) {
356
+		if (is_callable('gzopen')) {
357 357
 			$posting['gzip']['success'] = true;
358 358
 		} else {
359 359
 			$posting['gzip']['success'] = false;
360
-			$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>' );
360
+			$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>');
361 361
 		}
362 362
 
363 363
 
364 364
 		// GD Graphics Library.
365 365
 		$posting['gd']['name']    = 'GD Graphics Library';
366
-		$posting['gd']['help']    = __( 'GD Graphics Library is used for dynamically manipulating images.', 'give' );
367
-		$posting['gd']['success'] = extension_loaded( 'gd' ) && function_exists( 'gd_info' ) ? true : false;
366
+		$posting['gd']['help']    = __('GD Graphics Library is used for dynamically manipulating images.', 'give');
367
+		$posting['gd']['success'] = extension_loaded('gd') && function_exists('gd_info') ? true : false;
368 368
 
369 369
 		// Multibyte String.
370 370
 		$posting['mbstring']['name'] = 'Multibyte String';
371
-		$posting['mbstring']['help'] = __( 'Multibyte String (mbstring) is used to convert character encoding, like for emails or converting characters to lowercase.', 'give' );
371
+		$posting['mbstring']['help'] = __('Multibyte String (mbstring) is used to convert character encoding, like for emails or converting characters to lowercase.', 'give');
372 372
 
373
-		if ( extension_loaded( 'mbstring' ) ) {
373
+		if (extension_loaded('mbstring')) {
374 374
 			$posting['mbstring']['success'] = true;
375 375
 		} else {
376 376
 			$posting['mbstring']['success'] = false;
377
-			$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>' );
377
+			$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>');
378 378
 		}
379 379
 
380 380
 		// WP Remote Post Check.
381
-		$posting['wp_remote_post']['name'] = __( 'Remote Post', 'give' );
382
-		$posting['wp_remote_post']['help'] = __( 'PayPal uses this method of communicating when sending back transaction information.', 'give' );
381
+		$posting['wp_remote_post']['name'] = __('Remote Post', 'give');
382
+		$posting['wp_remote_post']['help'] = __('PayPal uses this method of communicating when sending back transaction information.', 'give');
383 383
 
384
-		$response = wp_safe_remote_post( 'https://www.paypal.com/cgi-bin/webscr', array(
384
+		$response = wp_safe_remote_post('https://www.paypal.com/cgi-bin/webscr', array(
385 385
 			'timeout'     => 60,
386
-			'user-agent'  => 'Give/' . GIVE_VERSION,
386
+			'user-agent'  => 'Give/'.GIVE_VERSION,
387 387
 			'httpversion' => '1.1',
388 388
 			'body'        => array(
389 389
 				'cmd' => '_notify-validate',
390 390
 			),
391
-		) );
391
+		));
392 392
 
393
-		if ( ! is_wp_error( $response ) && $response['response']['code'] >= 200 && $response['response']['code'] < 300 ) {
393
+		if ( ! is_wp_error($response) && $response['response']['code'] >= 200 && $response['response']['code'] < 300) {
394 394
 			$posting['wp_remote_post']['success'] = true;
395 395
 		} else {
396
-			$posting['wp_remote_post']['note'] = __( 'wp_remote_post() failed. PayPal IPN won\'t work with your server. Contact your hosting provider.', 'give' );
397
-			if ( is_wp_error( $response ) ) {
398
-				$posting['wp_remote_post']['note'] .= ' ' . sprintf( __( 'Error: %s', 'give' ), sanitize_text_field( $response->get_error_message() ) );
396
+			$posting['wp_remote_post']['note'] = __('wp_remote_post() failed. PayPal IPN won\'t work with your server. Contact your hosting provider.', 'give');
397
+			if (is_wp_error($response)) {
398
+				$posting['wp_remote_post']['note'] .= ' '.sprintf(__('Error: %s', 'give'), sanitize_text_field($response->get_error_message()));
399 399
 			} else {
400
-				$posting['wp_remote_post']['note'] .= ' ' . sprintf( __( 'Status code: %s', 'give' ), sanitize_text_field( $response['response']['code'] ) );
400
+				$posting['wp_remote_post']['note'] .= ' '.sprintf(__('Status code: %s', 'give'), sanitize_text_field($response['response']['code']));
401 401
 			}
402 402
 			$posting['wp_remote_post']['success'] = false;
403 403
 		}
404 404
 
405 405
 		// WP Remote Get Check.
406
-		$posting['wp_remote_get']['name'] = __( 'Remote Get', 'give' );
407
-		$posting['wp_remote_get']['help'] = __( 'Give plugins may use this method of communication when checking for plugin updates.', 'give' );
406
+		$posting['wp_remote_get']['name'] = __('Remote Get', 'give');
407
+		$posting['wp_remote_get']['help'] = __('Give plugins may use this method of communication when checking for plugin updates.', 'give');
408 408
 
409
-		$response = wp_safe_remote_get( 'https://woocommerce.com/wc-api/product-key-api?request=ping&network=' . ( is_multisite() ? '1' : '0' ) );
409
+		$response = wp_safe_remote_get('https://woocommerce.com/wc-api/product-key-api?request=ping&network='.(is_multisite() ? '1' : '0'));
410 410
 
411
-		if ( ! is_wp_error( $response ) && $response['response']['code'] >= 200 && $response['response']['code'] < 300 ) {
411
+		if ( ! is_wp_error($response) && $response['response']['code'] >= 200 && $response['response']['code'] < 300) {
412 412
 			$posting['wp_remote_get']['success'] = true;
413 413
 		} else {
414
-			$posting['wp_remote_get']['note'] = __( 'wp_remote_get() failed. The Give plugin updater won\'t work with your server. Contact your hosting provider.', 'give' );
415
-			if ( is_wp_error( $response ) ) {
416
-				$posting['wp_remote_get']['note'] .= ' ' . sprintf( __( 'Error: %s', 'give' ), give_clean( $response->get_error_message() ) );
414
+			$posting['wp_remote_get']['note'] = __('wp_remote_get() failed. The Give plugin updater won\'t work with your server. Contact your hosting provider.', 'give');
415
+			if (is_wp_error($response)) {
416
+				$posting['wp_remote_get']['note'] .= ' '.sprintf(__('Error: %s', 'give'), give_clean($response->get_error_message()));
417 417
 			} else {
418
-				$posting['wp_remote_get']['note'] .= ' ' . sprintf( __( 'Status code: %s', 'give' ), give_clean( $response['response']['code'] ) );
418
+				$posting['wp_remote_get']['note'] .= ' '.sprintf(__('Status code: %s', 'give'), give_clean($response['response']['code']));
419 419
 			}
420 420
 			$posting['wp_remote_get']['success'] = false;
421 421
 		}
422 422
 
423
-		$posting = apply_filters( 'give_debug_posting', $posting );
423
+		$posting = apply_filters('give_debug_posting', $posting);
424 424
 
425
-		foreach ( $posting as $post ) {
426
-			$mark = ! empty( $post['success'] ) ? 'yes' : 'error';
425
+		foreach ($posting as $post) {
426
+			$mark = ! empty($post['success']) ? 'yes' : 'error';
427 427
 			?>
428 428
 			<tr>
429
-				<td data-export-label="<?php echo esc_html( $post['name'] ); ?>"><?php echo esc_html( $post['name'] ); ?>:</td>
430
-				<td class="help"><?php echo Give()->tooltips->render_help( esc_attr( isset( $post['help'] ) ? $post['help'] : '' ) ); ?></td>
429
+				<td data-export-label="<?php echo esc_html($post['name']); ?>"><?php echo esc_html($post['name']); ?>:</td>
430
+				<td class="help"><?php echo Give()->tooltips->render_help(esc_attr(isset($post['help']) ? $post['help'] : '')); ?></td>
431 431
 				<td>
432 432
 					<mark class="<?php echo $mark; ?>">
433
-						<?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'] ) : ''; ?>
433
+						<?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']) : ''; ?>
434 434
 					</mark>
435 435
 				</td>
436 436
 			</tr>
@@ -443,47 +443,47 @@  discard block
 block discarded – undo
443 443
 <table class="give-status-table widefat" cellspacing="0">
444 444
 	<thead>
445 445
 		<tr>
446
-			<th colspan="3" data-export-label="Give Configuration"><h2><?php _e( 'Give Configuration', 'give' ); ?></h2></th>
446
+			<th colspan="3" data-export-label="Give Configuration"><h2><?php _e('Give Configuration', 'give'); ?></h2></th>
447 447
 		</tr>
448 448
 	</thead>
449 449
 	<tbody>
450 450
 		<tr>
451
-			<td data-export-label="Give Version"><?php _e( 'Give Version', 'give' ); ?>:</td>
452
-			<td class="help"><?php echo Give()->tooltips->render_help( __( 'The version of Give installed on your site.', 'give' ) ); ?></td>
453
-			<td><?php echo esc_html( GIVE_VERSION ); ?></td>
451
+			<td data-export-label="Give Version"><?php _e('Give Version', 'give'); ?>:</td>
452
+			<td class="help"><?php echo Give()->tooltips->render_help(__('The version of Give installed on your site.', 'give')); ?></td>
453
+			<td><?php echo esc_html(GIVE_VERSION); ?></td>
454 454
 		</tr>
455 455
 		<tr>
456
-			<td data-export-label="Give Cache"><?php _e( 'Give Cache', 'give' ); ?>:</td>
457
-			<td class="help"><?php echo Give()->tooltips->render_help( __( 'Whether cache is enabled in Give settings.', 'give' ) ); ?></td>
458
-			<td><?php echo give_is_setting_enabled( give_get_option('cache', 'enabled' ) ) ? __( 'Enabled', 'give' ) : __( 'Disabled', 'give' ); ?></td>
456
+			<td data-export-label="Give Cache"><?php _e('Give Cache', 'give'); ?>:</td>
457
+			<td class="help"><?php echo Give()->tooltips->render_help(__('Whether cache is enabled in Give settings.', 'give')); ?></td>
458
+			<td><?php echo give_is_setting_enabled(give_get_option('cache', 'enabled')) ? __('Enabled', 'give') : __('Disabled', 'give'); ?></td>
459 459
 		</tr>
460 460
 		<tr>
461
-			<td data-export-label="Database Updates"><?php _e( 'Database Updates', 'give' ); ?>:</td>
462
-			<td class="help"><?php echo Give()->tooltips->render_help( __( 'This will show the number of pending database updates.', 'give' ) ); ?></td>
461
+			<td data-export-label="Database Updates"><?php _e('Database Updates', 'give'); ?>:</td>
462
+			<td class="help"><?php echo Give()->tooltips->render_help(__('This will show the number of pending database updates.', 'give')); ?></td>
463 463
 			<td>
464 464
 				<?php
465
-				$updates_text    = __( 'All DB Updates Completed.', 'give' );
465
+				$updates_text    = __('All DB Updates Completed.', 'give');
466 466
 				$pending_updates = $give_updates->get_total_new_db_update_count();
467 467
 				$total_updates   = $give_updates->get_total_db_update_count();
468 468
 
469
-				if( Give_Updates::$background_updater->is_paused_process() ) {
469
+				if (Give_Updates::$background_updater->is_paused_process()) {
470 470
 					// When all the db updates are pending.
471 471
 					$updates_text = sprintf(
472
-						__( '%1$s updates still need to run. (Paused) ', 'give' ),
473
-						count( $give_updates->get_updates('database', 'new' ) )
472
+						__('%1$s updates still need to run. (Paused) ', 'give'),
473
+						count($give_updates->get_updates('database', 'new'))
474 474
 					);
475
-				} elseif( $pending_updates === $total_updates ) {
475
+				} elseif ($pending_updates === $total_updates) {
476 476
 
477 477
 					// When all the db updates are pending.
478 478
 					$updates_text = sprintf(
479
-						__( '%1$s updates still need to run.', 'give' ),
479
+						__('%1$s updates still need to run.', 'give'),
480 480
 						$total_updates
481 481
 					);
482
-				} elseif( $pending_updates > 0 ) {
482
+				} elseif ($pending_updates > 0) {
483 483
 
484 484
 					// When some of the db updates are completed and some are pending.
485 485
 					$updates_text = sprintf(
486
-						__( '%1$s of %2$s updates still need to run.', 'give' ),
486
+						__('%1$s of %2$s updates still need to run.', 'give'),
487 487
 						$pending_updates,
488 488
 						$total_updates
489 489
 					);
@@ -494,144 +494,143 @@  discard block
 block discarded – undo
494 494
 			</td>
495 495
 		</tr>
496 496
 		<tr>
497
-			<td data-export-label="Give Cache"><?php _e( 'Give Cache', 'give' ); ?>:</td>
498
-			<td class="help"><?php echo Give()->tooltips->render_help( __( 'Whether cache is enabled in Give settings.', 'give' ) ); ?></td>
499
-			<td><?php echo give_is_setting_enabled( give_get_option('cache', 'enabled' ) ) ? __( 'Enabled', 'give' ) : __( 'Disabled', 'give' ); ?></td>
497
+			<td data-export-label="Give Cache"><?php _e('Give Cache', 'give'); ?>:</td>
498
+			<td class="help"><?php echo Give()->tooltips->render_help(__('Whether cache is enabled in Give settings.', 'give')); ?></td>
499
+			<td><?php echo give_is_setting_enabled(give_get_option('cache', 'enabled')) ? __('Enabled', 'give') : __('Disabled', 'give'); ?></td>
500 500
 		</tr>
501 501
 		<tr>
502
-			<td data-export-label="Give Cache"><?php _e( 'Give Emails', 'give' ); ?>:</td>
503
-			<td class="help"><?php echo Give()->tooltips->render_help( __( 'Whether emails is enabled in Give settings.', 'give' ) ); ?></td>
502
+			<td data-export-label="Give Cache"><?php _e('Give Emails', 'give'); ?>:</td>
503
+			<td class="help"><?php echo Give()->tooltips->render_help(__('Whether emails is enabled in Give settings.', 'give')); ?></td>
504 504
 			<td>
505 505
 				<?php
506 506
 				/* @var Give_Email_Notification $email_notification */
507
-				if( $email_notifications = Give_Email_Notifications::get_instance()->get_email_notifications() ) {
507
+				if ($email_notifications = Give_Email_Notifications::get_instance()->get_email_notifications()) {
508 508
 					ob_start();
509 509
 
510
-					foreach ( Give_Email_Notifications::get_instance()->get_email_notifications() as $email_notification ) {
511
-						$status = Give_Email_Notification_Util::is_email_notification_active( $email_notification ) ?
512
-							'yes' :
513
-							'error';
510
+					foreach (Give_Email_Notifications::get_instance()->get_email_notifications() as $email_notification) {
511
+						$status = Give_Email_Notification_Util::is_email_notification_active($email_notification) ?
512
+							'yes' : 'error';
514 513
 
515 514
 						echo sprintf(
516 515
 							'<li><mark class="%1$s"><span class="dashicons dashicons-%2$s"></mark></span>%3$s</li>',
517
-							Give_Email_Notification_Util::is_email_notification_active( $email_notification ) ? 'yes' : 'error',
518
-							Give_Email_Notification_Util::is_email_notification_active( $email_notification ) ? 'yes' : 'no-alt',
516
+							Give_Email_Notification_Util::is_email_notification_active($email_notification) ? 'yes' : 'error',
517
+							Give_Email_Notification_Util::is_email_notification_active($email_notification) ? 'yes' : 'no-alt',
519 518
 							$email_notification->config['label']
520 519
 						);
521 520
 					}
522 521
 
523
-					echo sprintf( '<ul>%s</ul>', ob_get_clean() );
522
+					echo sprintf('<ul>%s</ul>', ob_get_clean());
524 523
 				}
525 524
 				?>
526 525
 			</td>
527 526
 		</tr>
528 527
 		<tr>
529
-			<td data-export-label="Upgraded From"><?php _e( 'Upgraded From', 'give' ); ?>:</td>
530
-			<td class="help"><?php echo Give()->tooltips->render_help( __( 'The version of Give installed prior to the last update.', 'give' ) ); ?></td>
531
-			<td><?php echo esc_html( get_option( 'give_version_upgraded_from', '&ndash;' ) ); ?></td>
528
+			<td data-export-label="Upgraded From"><?php _e('Upgraded From', 'give'); ?>:</td>
529
+			<td class="help"><?php echo Give()->tooltips->render_help(__('The version of Give installed prior to the last update.', 'give')); ?></td>
530
+			<td><?php echo esc_html(get_option('give_version_upgraded_from', '&ndash;')); ?></td>
532 531
 		</tr>
533 532
 		<tr>
534
-			<td data-export-label="Test Mode"><?php _e( 'Test Mode', 'give' ); ?>:</td>
535
-			<td class="help"><?php echo Give()->tooltips->render_help( __( 'Whether Test Mode is enabled in Give settings.', 'give' ) ); ?></td>
536
-			<td><?php echo give_is_test_mode() ? __( 'Enabled', 'give' ) : __( 'Disabled', 'give' ); ?></td>
533
+			<td data-export-label="Test Mode"><?php _e('Test Mode', 'give'); ?>:</td>
534
+			<td class="help"><?php echo Give()->tooltips->render_help(__('Whether Test Mode is enabled in Give settings.', 'give')); ?></td>
535
+			<td><?php echo give_is_test_mode() ? __('Enabled', 'give') : __('Disabled', 'give'); ?></td>
537 536
 		</tr>
538 537
 		<tr>
539
-			<td data-export-label="Currency Code"><?php _e( 'Currency Code', 'give' ); ?>:</td>
540
-			<td class="help"><?php echo Give()->tooltips->render_help( __( 'The currency code selected in Give settings.', 'give' ) ); ?></td>
541
-			<td><?php echo esc_html( give_get_currency() ); ?></td>
538
+			<td data-export-label="Currency Code"><?php _e('Currency Code', 'give'); ?>:</td>
539
+			<td class="help"><?php echo Give()->tooltips->render_help(__('The currency code selected in Give settings.', 'give')); ?></td>
540
+			<td><?php echo esc_html(give_get_currency()); ?></td>
542 541
 		</tr>
543 542
 		<tr>
544
-			<td data-export-label="Currency Position"><?php _e( 'Currency Position', 'give' ); ?>:</td>
545
-			<td class="help"><?php echo Give()->tooltips->render_help( __( 'The currency position selected in Give settings.', 'give' ) ); ?></td>
546
-			<td><?php echo 'before' === give_get_option( 'currency_position' ) ? __( 'Before', 'give' ) : __( 'After', 'give' ); ?></td>
543
+			<td data-export-label="Currency Position"><?php _e('Currency Position', 'give'); ?>:</td>
544
+			<td class="help"><?php echo Give()->tooltips->render_help(__('The currency position selected in Give settings.', 'give')); ?></td>
545
+			<td><?php echo 'before' === give_get_option('currency_position') ? __('Before', 'give') : __('After', 'give'); ?></td>
547 546
 		</tr>
548 547
 		<tr>
549
-			<td data-export-label="Decimal Separator"><?php _e( 'Decimal Separator', 'give' ); ?>:</td>
550
-			<td class="help"><?php echo Give()->tooltips->render_help( __( 'The decimal separator defined in Give settings.', 'give' ) ); ?></td>
551
-			<td><?php echo esc_html( give_get_price_decimal_separator() ); ?></td>
548
+			<td data-export-label="Decimal Separator"><?php _e('Decimal Separator', 'give'); ?>:</td>
549
+			<td class="help"><?php echo Give()->tooltips->render_help(__('The decimal separator defined in Give settings.', 'give')); ?></td>
550
+			<td><?php echo esc_html(give_get_price_decimal_separator()); ?></td>
552 551
 		</tr>
553 552
 		<tr>
554
-			<td data-export-label="Thousands Separator"><?php _e( 'Thousands Separator', 'give' ); ?>:</td>
555
-			<td class="help"><?php echo Give()->tooltips->render_help( __( 'The thousands separator defined in Give settings.', 'give' ) ); ?></td>
556
-			<td><?php echo esc_html( give_get_price_thousand_separator() ); ?></td>
553
+			<td data-export-label="Thousands Separator"><?php _e('Thousands Separator', 'give'); ?>:</td>
554
+			<td class="help"><?php echo Give()->tooltips->render_help(__('The thousands separator defined in Give settings.', 'give')); ?></td>
555
+			<td><?php echo esc_html(give_get_price_thousand_separator()); ?></td>
557 556
 		</tr>
558 557
 		<tr>
559
-			<td data-export-label="Success Page"><?php _e( 'Success Page', 'give' ); ?>:</td>
560
-			<td class="help"><?php echo Give()->tooltips->render_help( __( 'The page where donors land following a successful transaction.', 'give' ) ); ?></td>
561
-			<td><?php echo ! empty( $give_options['success_page'] ) ? esc_url( get_permalink( $give_options['success_page'] ) ) : '&ndash;'; ?></td>
558
+			<td data-export-label="Success Page"><?php _e('Success Page', 'give'); ?>:</td>
559
+			<td class="help"><?php echo Give()->tooltips->render_help(__('The page where donors land following a successful transaction.', 'give')); ?></td>
560
+			<td><?php echo ! empty($give_options['success_page']) ? esc_url(get_permalink($give_options['success_page'])) : '&ndash;'; ?></td>
562 561
 		</tr>
563 562
 		<tr>
564
-			<td data-export-label="Failure Page"><?php _e( 'Failure Page', 'give' ); ?>:</td>
565
-			<td class="help"><?php echo Give()->tooltips->render_help( __( 'The page where donors land following a failed transaction.', 'give' ) ); ?></td>
566
-			<td><?php echo ! empty( $give_options['failure_page'] ) ? esc_url( get_permalink( $give_options['failure_page'] ) ) : '&ndash;'; ?></td>
563
+			<td data-export-label="Failure Page"><?php _e('Failure Page', 'give'); ?>:</td>
564
+			<td class="help"><?php echo Give()->tooltips->render_help(__('The page where donors land following a failed transaction.', 'give')); ?></td>
565
+			<td><?php echo ! empty($give_options['failure_page']) ? esc_url(get_permalink($give_options['failure_page'])) : '&ndash;'; ?></td>
567 566
 		</tr>
568 567
 		<tr>
569
-			<td data-export-label="Donation History Page"><?php _e( 'Donation History Page', 'give' ); ?>:</td>
570
-			<td class="help"><?php echo Give()->tooltips->render_help( __( 'The page where past donations are listed.', 'give' ) ); ?></td>
571
-			<td><?php echo ! empty( $give_options['history_page'] ) ? esc_url( get_permalink( $give_options['history_page'] ) ) : '&ndash;'; ?></td>
568
+			<td data-export-label="Donation History Page"><?php _e('Donation History Page', 'give'); ?>:</td>
569
+			<td class="help"><?php echo Give()->tooltips->render_help(__('The page where past donations are listed.', 'give')); ?></td>
570
+			<td><?php echo ! empty($give_options['history_page']) ? esc_url(get_permalink($give_options['history_page'])) : '&ndash;'; ?></td>
572 571
 		</tr>
573 572
 		<tr>
574
-			<td data-export-label="Give Forms Slug"><?php _e( 'Give Forms Slug', 'give' ); ?>:</td>
575
-			<td class="help"><?php echo Give()->tooltips->render_help( __( 'The slug used for Give donation forms.', 'give' ) ); ?></td>
576
-			<td><?php echo esc_html( defined( 'GIVE_SLUG' ) ? '/' . GIVE_SLUG . '/' : '/donations/' ); ?></td>
573
+			<td data-export-label="Give Forms Slug"><?php _e('Give Forms Slug', 'give'); ?>:</td>
574
+			<td class="help"><?php echo Give()->tooltips->render_help(__('The slug used for Give donation forms.', 'give')); ?></td>
575
+			<td><?php echo esc_html(defined('GIVE_SLUG') ? '/'.GIVE_SLUG.'/' : '/donations/'); ?></td>
577 576
 		</tr>
578 577
 		<?php
579 578
 		$active_gateways  = give_get_enabled_payment_gateways();
580 579
 		$enabled_gateways = $default_gateway = '';
581 580
 
582
-		if ( $active_gateways ) {
583
-			$default_gateway_is_active = give_is_gateway_active( give_get_default_gateway( null ) );
581
+		if ($active_gateways) {
582
+			$default_gateway_is_active = give_is_gateway_active(give_get_default_gateway(null));
584 583
 
585
-			if ( $default_gateway_is_active ) {
586
-				$default_gateway = give_get_default_gateway( null );
587
-				$default_gateway = $active_gateways[ $default_gateway ]['admin_label'];
584
+			if ($default_gateway_is_active) {
585
+				$default_gateway = give_get_default_gateway(null);
586
+				$default_gateway = $active_gateways[$default_gateway]['admin_label'];
588 587
 			} else {
589
-				$default_gateway = __( 'Test Donation', 'give' );
588
+				$default_gateway = __('Test Donation', 'give');
590 589
 			}
591 590
 
592 591
 			$gateways = array();
593 592
 
594
-			foreach ( $active_gateways as $gateway ) {
593
+			foreach ($active_gateways as $gateway) {
595 594
 				$gateways[] = $gateway['admin_label'];
596 595
 			}
597 596
 
598
-			$enabled_gateways = implode( ', ', $gateways );
597
+			$enabled_gateways = implode(', ', $gateways);
599 598
 		}
600 599
 		?>
601 600
 		<tr>
602
-			<td data-export-label="Enabled Payment Gateways"><?php _e( 'Enabled Payment Gateways', 'give' ); ?>:</td>
603
-			<td class="help"><?php echo Give()->tooltips->render_help( __( 'All payment gateways enabled in Give settings.', 'give' ) ); ?></td>
604
-			<td><?php echo esc_html( ! empty( $enabled_gateways ) ? $enabled_gateways : '&ndash;' ); ?></td>
601
+			<td data-export-label="Enabled Payment Gateways"><?php _e('Enabled Payment Gateways', 'give'); ?>:</td>
602
+			<td class="help"><?php echo Give()->tooltips->render_help(__('All payment gateways enabled in Give settings.', 'give')); ?></td>
603
+			<td><?php echo esc_html( ! empty($enabled_gateways) ? $enabled_gateways : '&ndash;'); ?></td>
605 604
 		</tr>
606 605
 		<tr>
607
-			<td data-export-label="Default Payment Gateway"><?php _e( 'Default Payment Gateway', 'give' ); ?>:</td>
608
-			<td class="help"><?php echo Give()->tooltips->render_help( __( 'The default payment gateway selected in Give settings.', 'give' ) ); ?></td>
609
-			<td><?php echo esc_html( ! empty( $default_gateway ) ? $default_gateway : '&ndash;' ); ?></td>
606
+			<td data-export-label="Default Payment Gateway"><?php _e('Default Payment Gateway', 'give'); ?>:</td>
607
+			<td class="help"><?php echo Give()->tooltips->render_help(__('The default payment gateway selected in Give settings.', 'give')); ?></td>
608
+			<td><?php echo esc_html( ! empty($default_gateway) ? $default_gateway : '&ndash;'); ?></td>
610 609
 		</tr>
611 610
 		<tr>
612
-			<td data-export-label="PayPal IPN Verification"><?php _e( 'PayPal IPN Verification', 'give' ); ?>:</td>
613
-			<td class="help"><?php echo Give()->tooltips->render_help( __( 'Whether admins requires verification of IPN notifications with PayPal.', 'give' ) ); ?></td>
614
-			<td><?php echo 'enabled' === give_get_option( 'paypal_verification' ) ? __( 'Enabled', 'give' ) : __( 'Disabled', 'give' ); ?></td>
611
+			<td data-export-label="PayPal IPN Verification"><?php _e('PayPal IPN Verification', 'give'); ?>:</td>
612
+			<td class="help"><?php echo Give()->tooltips->render_help(__('Whether admins requires verification of IPN notifications with PayPal.', 'give')); ?></td>
613
+			<td><?php echo 'enabled' === give_get_option('paypal_verification') ? __('Enabled', 'give') : __('Disabled', 'give'); ?></td>
615 614
 		</tr>
616 615
 		<tr>
617
-			<td data-export-label="PayPal IPN Notifications"><?php _e( 'PayPal IPN Notifications', 'give' ); ?>:</td>
618
-			<td class="help"><?php echo Give()->tooltips->render_help( __( 'Displays whether when last PayPal IPN is received with which donation or transaction.', 'give' ) ); ?></td>
616
+			<td data-export-label="PayPal IPN Notifications"><?php _e('PayPal IPN Notifications', 'give'); ?>:</td>
617
+			<td class="help"><?php echo Give()->tooltips->render_help(__('Displays whether when last PayPal IPN is received with which donation or transaction.', 'give')); ?></td>
619 618
 			<td>
620 619
 				<?php
621
-				$last_paypal_ipn_received = get_option( 'give_last_paypal_ipn_received' );
622
-				if ( is_array( $last_paypal_ipn_received ) && count( $last_paypal_ipn_received ) > 0 ) {
620
+				$last_paypal_ipn_received = get_option('give_last_paypal_ipn_received');
621
+				if (is_array($last_paypal_ipn_received) && count($last_paypal_ipn_received) > 0) {
623 622
 					$donation_id     = $last_paypal_ipn_received['payment_id'];
624
-					$ipn_timestamp   = give_get_meta( $donation_id, 'give_last_paypal_ipn_received', true );
625
-					$transaction_url = 'https://history.paypal.com/cgi-bin/webscr?cmd=_history-details-from-hub&id=' . $last_paypal_ipn_received['transaction_id'];
626
-					$donation_url    = site_url() . '/wp-admin/edit.php?post_type=give_forms&page=give-payment-history&view=view-payment-details&id=' . $donation_id;
623
+					$ipn_timestamp   = give_get_meta($donation_id, 'give_last_paypal_ipn_received', true);
624
+					$transaction_url = 'https://history.paypal.com/cgi-bin/webscr?cmd=_history-details-from-hub&id='.$last_paypal_ipn_received['transaction_id'];
625
+					$donation_url    = site_url().'/wp-admin/edit.php?post_type=give_forms&page=give-payment-history&view=view-payment-details&id='.$donation_id;
627 626
 					echo sprintf(
628
-						__( 'IPN received for <a href="%s">#%s</a> ( <a href="%s" target="_blank">%s</a> ) on %s at %s. Status %s', 'give' ),
627
+						__('IPN received for <a href="%s">#%s</a> ( <a href="%s" target="_blank">%s</a> ) on %s at %s. Status %s', 'give'),
629 628
 						$donation_url,
630 629
 						$donation_id,
631 630
 						$transaction_url,
632 631
 						$last_paypal_ipn_received['transaction_id'],
633
-						date_i18n( 'm/d/Y', $ipn_timestamp ),
634
-						date_i18n( 'H:i', $ipn_timestamp ),
632
+						date_i18n('m/d/Y', $ipn_timestamp),
633
+						date_i18n('H:i', $ipn_timestamp),
635 634
 						$last_paypal_ipn_received['auth_status']
636 635
 					);
637 636
 				} else {
@@ -641,9 +640,9 @@  discard block
 block discarded – undo
641 640
 			</td>
642 641
 		</tr>
643 642
 		<tr>
644
-			<td data-export-label="Donor Email Access"><?php _e( 'Donor Email Access', 'give' ); ?>:</td>
645
-			<td class="help"><?php echo Give()->tooltips->render_help( __( 'Whether donors can access their donation history using only email.', 'give' ) ); ?></td>
646
-			<td><?php echo 'enabled' === give_get_option( 'email_access' ) ? __( 'Enabled', 'give' ) : __( 'Disabled', 'give' ); ?></td>
643
+			<td data-export-label="Donor Email Access"><?php _e('Donor Email Access', 'give'); ?>:</td>
644
+			<td class="help"><?php echo Give()->tooltips->render_help(__('Whether donors can access their donation history using only email.', 'give')); ?></td>
645
+			<td><?php echo 'enabled' === give_get_option('email_access') ? __('Enabled', 'give') : __('Disabled', 'give'); ?></td>
647 646
 		</tr>
648 647
 	</tbody>
649 648
 </table>
@@ -651,45 +650,45 @@  discard block
 block discarded – undo
651 650
 <table class="give-status-table widefat" cellspacing="0">
652 651
 	<thead>
653 652
 		<tr>
654
-			<th colspan="3" data-export-label="Session Configuration"><h2><?php _e( 'Session Configuration', 'give' ); ?></h2></th>
653
+			<th colspan="3" data-export-label="Session Configuration"><h2><?php _e('Session Configuration', 'give'); ?></h2></th>
655 654
 		</tr>
656 655
 	</thead>
657 656
 	<tbody>
658 657
 		<tr>
659
-			<td data-export-label="Give Use Sessions"><?php _e( 'Give Use Sessions', 'give' ); ?>:</td>
660
-			<td class="help"><?php echo Give()->tooltips->render_help( __( 'Whether PHP sessions are enforced, enabled, or disabled.', 'give' ) ); ?></td>
661
-			<td><?php echo defined( 'GIVE_USE_PHP_SESSIONS' ) && GIVE_USE_PHP_SESSIONS ? __( 'Enforced', 'give' ) : ( Give()->session->use_php_sessions() ? __( 'Enabled', 'give' ) : __( 'Disabled', 'give' ) ); ?></td>
658
+			<td data-export-label="Give Use Sessions"><?php _e('Give Use Sessions', 'give'); ?>:</td>
659
+			<td class="help"><?php echo Give()->tooltips->render_help(__('Whether PHP sessions are enforced, enabled, or disabled.', 'give')); ?></td>
660
+			<td><?php echo defined('GIVE_USE_PHP_SESSIONS') && GIVE_USE_PHP_SESSIONS ? __('Enforced', 'give') : (Give()->session->use_php_sessions() ? __('Enabled', 'give') : __('Disabled', 'give')); ?></td>
662 661
 		</tr>
663 662
 		<tr>
664
-			<td data-export-label="Session"><?php _e( 'Session', 'give' ); ?>:</td>
665
-			<td class="help"><?php echo Give()->tooltips->render_help( __( 'Whether a PHP session is currently set.', 'give' ) ); ?></td>
666
-			<td><?php echo isset( $_SESSION ) ? __( 'Enabled', 'give' ) : __( 'Disabled', 'give' ); ?></td>
663
+			<td data-export-label="Session"><?php _e('Session', 'give'); ?>:</td>
664
+			<td class="help"><?php echo Give()->tooltips->render_help(__('Whether a PHP session is currently set.', 'give')); ?></td>
665
+			<td><?php echo isset($_SESSION) ? __('Enabled', 'give') : __('Disabled', 'give'); ?></td>
667 666
 		</tr>
668
-		<?php if ( isset( $_SESSION ) ) { ?>
667
+		<?php if (isset($_SESSION)) { ?>
669 668
 			<tr>
670
-				<td data-export-label="Session Name"><?php _e( 'Session Name', 'give' ); ?>:</td>
671
-				<td class="help"><?php echo Give()->tooltips->render_help( __( 'The name of the current PHP session.', 'give' ) ); ?></td>
672
-				<td><?php echo esc_html( ini_get( 'session.name' ) ); ?></td>
669
+				<td data-export-label="Session Name"><?php _e('Session Name', 'give'); ?>:</td>
670
+				<td class="help"><?php echo Give()->tooltips->render_help(__('The name of the current PHP session.', 'give')); ?></td>
671
+				<td><?php echo esc_html(ini_get('session.name')); ?></td>
673 672
 			</tr>
674 673
 			<tr>
675
-				<td data-export-label="Cookie Path"><?php _e( 'Cookie Path', 'give' ); ?>:</td>
676
-				<td class="help"><?php echo Give()->tooltips->render_help( __( 'The cookie path of the current PHP session.', 'give' ) ); ?></td>
677
-				<td><?php echo esc_html( ini_get( 'session.cookie_path' ) ); ?></td>
674
+				<td data-export-label="Cookie Path"><?php _e('Cookie Path', 'give'); ?>:</td>
675
+				<td class="help"><?php echo Give()->tooltips->render_help(__('The cookie path of the current PHP session.', 'give')); ?></td>
676
+				<td><?php echo esc_html(ini_get('session.cookie_path')); ?></td>
678 677
 			</tr>
679 678
 			<tr>
680
-				<td data-export-label="Save Path"><?php _e( 'Save Path', 'give' ); ?>:</td>
681
-				<td class="help"><?php echo Give()->tooltips->render_help( __( 'The save path of the current PHP session.', 'give' ) ); ?></td>
682
-				<td><?php echo esc_html( ini_get( 'session.save_path' ) ); ?></td>
679
+				<td data-export-label="Save Path"><?php _e('Save Path', 'give'); ?>:</td>
680
+				<td class="help"><?php echo Give()->tooltips->render_help(__('The save path of the current PHP session.', 'give')); ?></td>
681
+				<td><?php echo esc_html(ini_get('session.save_path')); ?></td>
683 682
 			</tr>
684 683
 			<tr>
685
-				<td data-export-label="Use Cookies"><?php _e( 'Use Cookies', 'give' ); ?>:</td>
686
-				<td class="help"><?php echo Give()->tooltips->render_help( __( 'Whether the current PHP session is set to use cookies.', 'give' ) ); ?></td>
687
-				<td><?php echo ini_get( 'session.use_cookies' ) ? __( 'Enabled', 'give' ) : __( 'Disabled', 'give' ); ?></td>
684
+				<td data-export-label="Use Cookies"><?php _e('Use Cookies', 'give'); ?>:</td>
685
+				<td class="help"><?php echo Give()->tooltips->render_help(__('Whether the current PHP session is set to use cookies.', 'give')); ?></td>
686
+				<td><?php echo ini_get('session.use_cookies') ? __('Enabled', 'give') : __('Disabled', 'give'); ?></td>
688 687
 			</tr>
689 688
 			<tr>
690
-				<td data-export-label="Use Only Cookies"><?php _e( 'Use Only Cookies', 'give' ); ?>:</td>
691
-				<td class="help"><?php echo Give()->tooltips->render_help( __( 'Whether the current PHP session is set to use only cookies.', 'give' ) ); ?></td>
692
-				<td><?php echo ini_get( 'session.use_only_cookies' ) ? __( 'Enabled', 'give' ) : __( 'Disabled', 'give' ); ?></td>
689
+				<td data-export-label="Use Only Cookies"><?php _e('Use Only Cookies', 'give'); ?>:</td>
690
+				<td class="help"><?php echo Give()->tooltips->render_help(__('Whether the current PHP session is set to use only cookies.', 'give')); ?></td>
691
+				<td><?php echo ini_get('session.use_only_cookies') ? __('Enabled', 'give') : __('Disabled', 'give'); ?></td>
693 692
 			</tr>
694 693
 		<?php } ?>
695 694
 	</tbody>
@@ -698,13 +697,13 @@  discard block
 block discarded – undo
698 697
 <table class="give-status-table widefat" cellspacing="0">
699 698
 	<thead>
700 699
 	<tr>
701
-		<th colspan="3" data-export-label="Active Give Add-ons"><h2><?php _e( 'Active Give Add-ons', 'give' ); ?></h2></th>
700
+		<th colspan="3" data-export-label="Active Give Add-ons"><h2><?php _e('Active Give Add-ons', 'give'); ?></h2></th>
702 701
 	</tr>
703 702
 	</thead>
704 703
 	<tbody>
705 704
 		<?php
706
-		foreach ( $plugins as $plugin_data ) {
707
-			if ( 'active' != $plugin_data['Status'] ||  'add-on' != $plugin_data['Type'] ) {
705
+		foreach ($plugins as $plugin_data) {
706
+			if ('active' != $plugin_data['Status'] || 'add-on' != $plugin_data['Type']) {
708 707
 				continue;
709 708
 			}
710 709
 
@@ -712,40 +711,40 @@  discard block
 block discarded – undo
712 711
 			$author_name = $plugin_data['Author'];
713 712
 
714 713
 			// Link the plugin name to the plugin URL if available.
715
-			if ( ! empty( $plugin_data['PluginURI'] ) ) {
714
+			if ( ! empty($plugin_data['PluginURI'])) {
716 715
 				$plugin_name = sprintf(
717 716
 					'<a href="%s" title="%s">%s</a>',
718
-					esc_url( $plugin_data['PluginURI'] ),
719
-					esc_attr__( 'Visit plugin homepage', 'give' ),
717
+					esc_url($plugin_data['PluginURI']),
718
+					esc_attr__('Visit plugin homepage', 'give'),
720 719
 					$plugin_name
721 720
 				);
722 721
 			}
723 722
 
724 723
 			// Link the author name to the author URL if available.
725
-			if ( ! empty( $plugin_data['AuthorURI'] ) ) {
724
+			if ( ! empty($plugin_data['AuthorURI'])) {
726 725
 				$author_name = sprintf(
727 726
 					'<a href="%s" title="%s">%s</a>',
728
-					esc_url( $plugin_data['AuthorURI'] ),
729
-					esc_attr__( 'Visit author homepage', 'give' ),
727
+					esc_url($plugin_data['AuthorURI']),
728
+					esc_attr__('Visit author homepage', 'give'),
730 729
 					$author_name
731 730
 				);
732 731
 			}
733 732
 			?>
734 733
 			<tr>
735
-				<td><?php echo wp_kses( $plugin_name, wp_kses_allowed_html( 'post' ) ); ?></td>
734
+				<td><?php echo wp_kses($plugin_name, wp_kses_allowed_html('post')); ?></td>
736 735
 				<td class="help">&nbsp;</td>
737 736
 				<td>
738 737
 					<?php
739
-					if ( true === $plugin_data['License'] ) {
740
-						echo '<mark class="yes"><span class="dashicons dashicons-yes"></span></mark> ' . __( 'Licensed', 'give' );
738
+					if (true === $plugin_data['License']) {
739
+						echo '<mark class="yes"><span class="dashicons dashicons-yes"></span></mark> '.__('Licensed', 'give');
741 740
 					} else {
742
-						echo '<mark class="error"><span class="dashicons dashicons-no-alt"></span></mark> ' . __( 'Unlicensed', 'give' );
741
+						echo '<mark class="error"><span class="dashicons dashicons-no-alt"></span></mark> '.__('Unlicensed', 'give');
743 742
 					}
744 743
 
745 744
 					echo ' &ndash; '
746
-					     . sprintf( _x( 'by %s', 'by author', 'give' ), wp_kses( $author_name, wp_kses_allowed_html( 'post' ) ) )
745
+					     . sprintf(_x('by %s', 'by author', 'give'), wp_kses($author_name, wp_kses_allowed_html('post')))
747 746
 					     . ' &ndash; '
748
-					     . esc_html( $plugin_data['Version'] );
747
+					     . esc_html($plugin_data['Version']);
749 748
 					?>
750 749
 				</td>
751 750
 			</tr>
@@ -758,18 +757,18 @@  discard block
 block discarded – undo
758 757
 <table class="give-status-table widefat" cellspacing="0">
759 758
 	<thead>
760 759
 		<tr>
761
-			<th colspan="3" data-export-label="Other Active Plugins"><h2><?php _e( 'Other Active Plugins', 'give' ); ?></h2></th>
760
+			<th colspan="3" data-export-label="Other Active Plugins"><h2><?php _e('Other Active Plugins', 'give'); ?></h2></th>
762 761
 		</tr>
763 762
 	</thead>
764 763
 	<tbody>
765 764
 		<?php
766
-		foreach ( $plugins as $plugin_data ) {
767
-			if ( 'active' != $plugin_data['Status'] ||  'other' != $plugin_data['Type'] ) {
765
+		foreach ($plugins as $plugin_data) {
766
+			if ('active' != $plugin_data['Status'] || 'other' != $plugin_data['Type']) {
768 767
 				continue;
769 768
 			}
770 769
 
771 770
 			// Do not show Give core plugin.
772
-			if ( 'Give - Donation Plugin' === $plugin_data['Name'] ) {
771
+			if ('Give - Donation Plugin' === $plugin_data['Name']) {
773 772
 				continue;
774 773
 			}
775 774
 
@@ -777,29 +776,29 @@  discard block
 block discarded – undo
777 776
 			$author_name = $plugin_data['Author'];
778 777
 
779 778
 			// Link the plugin name to the plugin URL if available.
780
-			if ( ! empty( $plugin_data['PluginURI'] ) ) {
779
+			if ( ! empty($plugin_data['PluginURI'])) {
781 780
 				$plugin_name = sprintf(
782 781
 					'<a href="%s" title="%s">%s</a>',
783
-					esc_url( $plugin_data['PluginURI'] ),
784
-					esc_attr__( 'Visit plugin homepage', 'give' ),
782
+					esc_url($plugin_data['PluginURI']),
783
+					esc_attr__('Visit plugin homepage', 'give'),
785 784
 					$plugin_name
786 785
 				);
787 786
 			}
788 787
 
789 788
 			// Link the author name to the author URL if available.
790
-			if ( ! empty( $plugin_data['AuthorURI'] ) ) {
789
+			if ( ! empty($plugin_data['AuthorURI'])) {
791 790
 				$author_name = sprintf(
792 791
 					'<a href="%s" title="%s">%s</a>',
793
-					esc_url( $plugin_data['AuthorURI'] ),
794
-					esc_attr__( 'Visit author homepage', 'give' ),
792
+					esc_url($plugin_data['AuthorURI']),
793
+					esc_attr__('Visit author homepage', 'give'),
795 794
 					$author_name
796 795
 				);
797 796
 			}
798 797
 			?>
799 798
 			<tr>
800
-				<td><?php echo wp_kses( $plugin_name, wp_kses_allowed_html( 'post' ) ); ?></td>
799
+				<td><?php echo wp_kses($plugin_name, wp_kses_allowed_html('post')); ?></td>
801 800
 				<td class="help">&nbsp;</td>
802
-				<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>
801
+				<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>
803 802
 			</tr>
804 803
 			<?php
805 804
 		}
@@ -810,13 +809,13 @@  discard block
 block discarded – undo
810 809
 <table class="give-status-table widefat" cellspacing="0">
811 810
 	<thead>
812 811
 		<tr>
813
-			<th colspan="3" data-export-label="Inactive Plugins"><h2><?php _e( 'Inactive Plugins', 'give' ); ?></h2></th>
812
+			<th colspan="3" data-export-label="Inactive Plugins"><h2><?php _e('Inactive Plugins', 'give'); ?></h2></th>
814 813
 		</tr>
815 814
 	</thead>
816 815
 	<tbody>
817 816
 		<?php
818
-		foreach ( $plugins as $plugin_data ) {
819
-			if ( 'inactive' != $plugin_data['Status'] ) {
817
+		foreach ($plugins as $plugin_data) {
818
+			if ('inactive' != $plugin_data['Status']) {
820 819
 				continue;
821 820
 			}
822 821
 
@@ -824,29 +823,29 @@  discard block
 block discarded – undo
824 823
 			$author_name = $plugin_data['Author'];
825 824
 
826 825
 			// Link the plugin name to the plugin URL if available.
827
-			if ( ! empty( $plugin_data['PluginURI'] ) ) {
826
+			if ( ! empty($plugin_data['PluginURI'])) {
828 827
 				$plugin_name = sprintf(
829 828
 					'<a href="%s" title="%s">%s</a>',
830
-					esc_url( $plugin_data['PluginURI'] ),
831
-					esc_attr__( 'Visit plugin homepage', 'give' ),
829
+					esc_url($plugin_data['PluginURI']),
830
+					esc_attr__('Visit plugin homepage', 'give'),
832 831
 					$plugin_name
833 832
 				);
834 833
 			}
835 834
 
836 835
 			// Link the author name to the author URL if available.
837
-			if ( ! empty( $plugin_data['AuthorURI'] ) ) {
836
+			if ( ! empty($plugin_data['AuthorURI'])) {
838 837
 				$author_name = sprintf(
839 838
 					'<a href="%s" title="%s">%s</a>',
840
-					esc_url( $plugin_data['AuthorURI'] ),
841
-					esc_attr__( 'Visit author homepage', 'give' ),
839
+					esc_url($plugin_data['AuthorURI']),
840
+					esc_attr__('Visit author homepage', 'give'),
842 841
 					$author_name
843 842
 				);
844 843
 			}
845 844
 			?>
846 845
 			<tr>
847
-				<td><?php echo wp_kses( $plugin_name, wp_kses_allowed_html( 'post' ) ); ?></td>
846
+				<td><?php echo wp_kses($plugin_name, wp_kses_allowed_html('post')); ?></td>
848 847
 				<td class="help">&nbsp;</td>
849
-				<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>
848
+				<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>
850 849
 			</tr>
851 850
 			<?php
852 851
 		}
@@ -856,38 +855,38 @@  discard block
 block discarded – undo
856 855
 
857 856
 <?php
858 857
 $active_mu_plugins = (array) get_mu_plugins();
859
-if ( ! empty( $active_mu_plugins ) ) {
858
+if ( ! empty($active_mu_plugins)) {
860 859
 ?>
861 860
 	<table class="give-status-table widefat" cellspacing="0">
862 861
 		<thead>
863 862
 			<tr>
864
-				<th colspan="3" data-export-label="Active MU Plugins"><h2><?php _e( 'Active MU Plugins', 'give' ); ?></h2></th>
863
+				<th colspan="3" data-export-label="Active MU Plugins"><h2><?php _e('Active MU Plugins', 'give'); ?></h2></th>
865 864
 			</tr>
866 865
 		</thead>
867 866
 		<tbody>
868 867
 			<?php
869 868
 
870
-			foreach ( $active_mu_plugins as $mu_plugin_data ) {
871
-				if ( ! empty( $mu_plugin_data['Name'] ) ) {
869
+			foreach ($active_mu_plugins as $mu_plugin_data) {
870
+				if ( ! empty($mu_plugin_data['Name'])) {
872 871
 					// Link the plugin name to the plugin URL if available.
873
-					$plugin_name = esc_html( $mu_plugin_data['Name'] );
872
+					$plugin_name = esc_html($mu_plugin_data['Name']);
874 873
 
875
-					if ( ! empty( $mu_plugin_data['PluginURI'] ) ) {
874
+					if ( ! empty($mu_plugin_data['PluginURI'])) {
876 875
 						$plugin_name = sprintf(
877 876
 							'<a href="%s" title="%s">%s</a>',
878
-							esc_url( $mu_plugin_data['PluginURI'] ),
879
-							esc_attr__( 'Visit plugin homepage', 'give' ),
877
+							esc_url($mu_plugin_data['PluginURI']),
878
+							esc_attr__('Visit plugin homepage', 'give'),
880 879
 							$plugin_name
881 880
 						);
882 881
 					}
883 882
 
884 883
 					// Link the author name to the author URL if available.
885
-					$author_name = esc_html( $mu_plugin_data['Author'] );
884
+					$author_name = esc_html($mu_plugin_data['Author']);
886 885
 
887
-					if ( ! empty( $mu_plugin_data['AuthorURI'] ) ) {
886
+					if ( ! empty($mu_plugin_data['AuthorURI'])) {
888 887
 						$author_name = sprintf(
889 888
 							'<a href="%s">%s</a>',
890
-							esc_url( $mu_plugin_data['AuthorURI'] ),
889
+							esc_url($mu_plugin_data['AuthorURI']),
891 890
 							$author_name
892 891
 						);
893 892
 					}
@@ -895,7 +894,7 @@  discard block
 block discarded – undo
895 894
 					<tr>
896 895
 						<td><?php echo $plugin_name; ?></td>
897 896
 						<td class="help">&nbsp;</td>
898
-						<td><?php echo sprintf( _x( 'by %s', 'by author', 'give' ), $author_name ) . ' &ndash; ' . esc_html( $mu_plugin_data['Version'] ); ?></td>
897
+						<td><?php echo sprintf(_x('by %s', 'by author', 'give'), $author_name).' &ndash; '.esc_html($mu_plugin_data['Version']); ?></td>
899 898
 					</tr>
900 899
 					<?php
901 900
 				}
@@ -908,53 +907,53 @@  discard block
 block discarded – undo
908 907
 <table class="give-status-table widefat" cellspacing="0">
909 908
 	<thead>
910 909
 		<tr>
911
-			<th colspan="3" data-export-label="Theme"><h2><?php _e( 'Theme', 'give' ); ?></h2></th>
910
+			<th colspan="3" data-export-label="Theme"><h2><?php _e('Theme', 'give'); ?></h2></th>
912 911
 		</tr>
913 912
 	</thead>
914 913
 	<?php
915
-	include_once( ABSPATH . 'wp-admin/includes/theme-install.php' );
914
+	include_once(ABSPATH.'wp-admin/includes/theme-install.php');
916 915
 	$active_theme = wp_get_theme();
917 916
 	?>
918 917
 	<tbody>
919 918
 		<tr>
920
-			<td data-export-label="Name"><?php _e( 'Name', 'give' ); ?>:</td>
921
-			<td class="help"><?php echo Give()->tooltips->render_help( __( 'The name of the current active theme.', 'give' )  ); ?></td>
922
-			<td><?php echo esc_html( $active_theme->Name ); ?></td>
919
+			<td data-export-label="Name"><?php _e('Name', 'give'); ?>:</td>
920
+			<td class="help"><?php echo Give()->tooltips->render_help(__('The name of the current active theme.', 'give')); ?></td>
921
+			<td><?php echo esc_html($active_theme->Name); ?></td>
923 922
 		</tr>
924 923
 		<tr>
925
-			<td data-export-label="Version"><?php _e( 'Version', 'give' ); ?>:</td>
926
-			<td class="help"><?php echo Give()->tooltips->render_help( __( 'The installed version of the current active theme.', 'give' ) ); ?></td>
927
-			<td><?php echo esc_html( $active_theme->Version ); ?></td>
924
+			<td data-export-label="Version"><?php _e('Version', 'give'); ?>:</td>
925
+			<td class="help"><?php echo Give()->tooltips->render_help(__('The installed version of the current active theme.', 'give')); ?></td>
926
+			<td><?php echo esc_html($active_theme->Version); ?></td>
928 927
 		</tr>
929 928
 		<tr>
930
-			<td data-export-label="Author URL"><?php _e( 'Author URL', 'give' ); ?>:</td>
931
-			<td class="help"><?php echo Give()->tooltips->render_help( __( 'The theme developer\'s URL.', 'give' ) ); ?></td>
929
+			<td data-export-label="Author URL"><?php _e('Author URL', 'give'); ?>:</td>
930
+			<td class="help"><?php echo Give()->tooltips->render_help(__('The theme developer\'s URL.', 'give')); ?></td>
932 931
 			<td><?php echo $active_theme->{'Author URI'}; ?></td>
933 932
 		</tr>
934 933
 		<tr>
935
-			<td data-export-label="Child Theme"><?php _e( 'Child Theme', 'give' ); ?>:</td>
936
-			<td class="help"><?php echo Give()->tooltips->render_help( __( 'Whether the current theme is a child theme.', 'give' ) ); ?></td>
934
+			<td data-export-label="Child Theme"><?php _e('Child Theme', 'give'); ?>:</td>
935
+			<td class="help"><?php echo Give()->tooltips->render_help(__('Whether the current theme is a child theme.', 'give')); ?></td>
937 936
 			<td><?php
938
-				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' );
937
+				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');
939 938
 				?></td>
940 939
 		</tr>
941 940
 		<?php
942
-		if( is_child_theme() ) {
943
-			$parent_theme = wp_get_theme( $active_theme->Template );
941
+		if (is_child_theme()) {
942
+			$parent_theme = wp_get_theme($active_theme->Template);
944 943
 		?>
945 944
 			<tr>
946
-				<td data-export-label="Parent Theme Name"><?php _e( 'Parent Theme Name', 'give' ); ?>:</td>
947
-				<td class="help"><?php echo Give()->tooltips->render_help( __( 'The name of the parent theme.', 'give' ) ); ?></td>
948
-				<td><?php echo esc_html( $parent_theme->Name ); ?></td>
945
+				<td data-export-label="Parent Theme Name"><?php _e('Parent Theme Name', 'give'); ?>:</td>
946
+				<td class="help"><?php echo Give()->tooltips->render_help(__('The name of the parent theme.', 'give')); ?></td>
947
+				<td><?php echo esc_html($parent_theme->Name); ?></td>
949 948
 			</tr>
950 949
 			<tr>
951
-				<td data-export-label="Parent Theme Version"><?php _e( 'Parent Theme Version', 'give' ); ?>:</td>
952
-				<td class="help"><?php echo Give()->tooltips->render_help( __( 'The installed version of the parent theme.', 'give' ) ); ?></td>
953
-				<td><?php echo esc_html( $parent_theme->Version ); ?></td>
950
+				<td data-export-label="Parent Theme Version"><?php _e('Parent Theme Version', 'give'); ?>:</td>
951
+				<td class="help"><?php echo Give()->tooltips->render_help(__('The installed version of the parent theme.', 'give')); ?></td>
952
+				<td><?php echo esc_html($parent_theme->Version); ?></td>
954 953
 			</tr>
955 954
 			<tr>
956
-				<td data-export-label="Parent Theme Author URL"><?php _e( 'Parent Theme Author URL', 'give' ); ?>:</td>
957
-				<td class="help"><?php echo Give()->tooltips->render_help( __( 'The parent theme developers URL.', 'give' ) ); ?></td>
955
+				<td data-export-label="Parent Theme Author URL"><?php _e('Parent Theme Author URL', 'give'); ?>:</td>
956
+				<td class="help"><?php echo Give()->tooltips->render_help(__('The parent theme developers URL.', 'give')); ?></td>
958 957
 				<td><?php echo $parent_theme->{'Author URI'}; ?></td>
959 958
 			</tr>
960 959
 		<?php } ?>
Please login to merge, or discard this patch.
includes/gateways/paypal-standard.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -565,7 +565,7 @@  discard block
 block discarded – undo
565 565
  *
566 566
  * @since 1.6.3
567 567
  *
568
- * @param $pending_reason
568
+ * @param string $pending_reason
569 569
  *
570 570
  * @return string
571 571
  */
@@ -642,7 +642,7 @@  discard block
 block discarded – undo
642 642
  * @param int   $payment_id   Payment ID
643 643
  * @param array $payment_data Array of payment data.
644 644
  *
645
- * @return mixed|string
645
+ * @return string
646 646
  */
647 647
 function give_build_paypal_url( $payment_id, $payment_data ) {
648 648
 	// Only send to PayPal if the pending payment is created successfully.
Please login to merge, or discard this patch.
Spacing   +156 added lines, -156 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
  * @since       1.0
10 10
  */
11 11
 
12
-if ( ! defined( 'ABSPATH' ) ) {
12
+if ( ! defined('ABSPATH')) {
13 13
 	exit;
14 14
 }
15 15
 
@@ -22,10 +22,10 @@  discard block
 block discarded – undo
22 22
  *
23 23
  * @return bool
24 24
  */
25
-function give_paypal_standard_billing_fields( $form_id ) {
25
+function give_paypal_standard_billing_fields($form_id) {
26 26
 
27
-	if ( give_is_setting_enabled( give_get_option( 'paypal_standard_billing_details' ) ) ) {
28
-		give_default_cc_address_fields( $form_id );
27
+	if (give_is_setting_enabled(give_get_option('paypal_standard_billing_details'))) {
28
+		give_default_cc_address_fields($form_id);
29 29
 
30 30
 		return true;
31 31
 	}
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
 
35 35
 }
36 36
 
37
-add_action( 'give_paypal_cc_form', 'give_paypal_standard_billing_fields' );
37
+add_action('give_paypal_cc_form', 'give_paypal_standard_billing_fields');
38 38
 
39 39
 /**
40 40
  * Process PayPal Payment.
@@ -45,28 +45,28 @@  discard block
 block discarded – undo
45 45
  *
46 46
  * @return void
47 47
  */
48
-function give_process_paypal_payment( $payment_data ) {
48
+function give_process_paypal_payment($payment_data) {
49 49
 
50 50
 	// Validate nonce.
51
-	give_validate_nonce( $payment_data['gateway_nonce'], 'give-gateway' );
51
+	give_validate_nonce($payment_data['gateway_nonce'], 'give-gateway');
52 52
 
53
-	$payment_id = give_create_payment( $payment_data );
53
+	$payment_id = give_create_payment($payment_data);
54 54
 
55 55
 	// Check payment.
56
-	if ( empty( $payment_id ) ) {
56
+	if (empty($payment_id)) {
57 57
 		// Record the error.
58
-		give_record_gateway_error( __( 'Payment Error', 'give' ), sprintf( /* translators: %s: payment data */
59
-			__( 'Payment creation failed before sending donor to PayPal. Payment data: %s', 'give' ), json_encode( $payment_data ) ), $payment_id );
58
+		give_record_gateway_error(__('Payment Error', 'give'), sprintf( /* translators: %s: payment data */
59
+			__('Payment creation failed before sending donor to PayPal. Payment data: %s', 'give'), json_encode($payment_data) ), $payment_id);
60 60
 		// Problems? Send back.
61
-		give_send_back_to_checkout( '?payment-mode=' . $payment_data['post_data']['give-gateway'] );
61
+		give_send_back_to_checkout('?payment-mode='.$payment_data['post_data']['give-gateway']);
62 62
 	}
63 63
 
64 64
 	// Redirect to PayPal.
65
-	wp_redirect( give_build_paypal_url( $payment_id, $payment_data ) );
65
+	wp_redirect(give_build_paypal_url($payment_id, $payment_data));
66 66
 	exit;
67 67
 }
68 68
 
69
-add_action( 'give_gateway_paypal', 'give_process_paypal_payment' );
69
+add_action('give_gateway_paypal', 'give_process_paypal_payment');
70 70
 
71 71
 /**
72 72
  * Listens for a PayPal IPN requests and then sends to the processing function.
@@ -77,17 +77,17 @@  discard block
 block discarded – undo
77 77
 function give_listen_for_paypal_ipn() {
78 78
 
79 79
 	// Regular PayPal IPN.
80
-	if ( isset( $_GET['give-listener'] ) && 'IPN' === $_GET['give-listener'] ) {
80
+	if (isset($_GET['give-listener']) && 'IPN' === $_GET['give-listener']) {
81 81
 		/**
82 82
 		 * Fires while verifying PayPal IPN
83 83
 		 *
84 84
 		 * @since 1.0
85 85
 		 */
86
-		do_action( 'give_verify_paypal_ipn' );
86
+		do_action('give_verify_paypal_ipn');
87 87
 	}
88 88
 }
89 89
 
90
-add_action( 'init', 'give_listen_for_paypal_ipn' );
90
+add_action('init', 'give_listen_for_paypal_ipn');
91 91
 
92 92
 /**
93 93
  * Process PayPal IPN
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
 function give_process_paypal_ipn() {
99 99
 
100 100
 	// Check the request method is POST.
101
-	if ( isset( $_SERVER['REQUEST_METHOD'] ) && 'POST' !== $_SERVER['REQUEST_METHOD'] ) {
101
+	if (isset($_SERVER['REQUEST_METHOD']) && 'POST' !== $_SERVER['REQUEST_METHOD']) {
102 102
 		return;
103 103
 	}
104 104
 
@@ -106,11 +106,11 @@  discard block
 block discarded – undo
106 106
 	$post_data = '';
107 107
 
108 108
 	// Fallback just in case post_max_size is lower than needed.
109
-	if ( ini_get( 'allow_url_fopen' ) ) {
110
-		$post_data = file_get_contents( 'php://input' );
109
+	if (ini_get('allow_url_fopen')) {
110
+		$post_data = file_get_contents('php://input');
111 111
 	} else {
112 112
 		// If allow_url_fopen is not enabled, then make sure that post_max_size is large enough.
113
-		ini_set( 'post_max_size', '12M' );
113
+		ini_set('post_max_size', '12M');
114 114
 	}
115 115
 	// Start the encoded data collection with notification command.
116 116
 	$encoded_data = 'cmd=_notify-validate';
@@ -119,41 +119,41 @@  discard block
 block discarded – undo
119 119
 	$arg_separator = give_get_php_arg_separator_output();
120 120
 
121 121
 	// Verify there is a post_data.
122
-	if ( $post_data || strlen( $post_data ) > 0 ) {
122
+	if ($post_data || strlen($post_data) > 0) {
123 123
 		// Append the data.
124
-		$encoded_data .= $arg_separator . $post_data;
124
+		$encoded_data .= $arg_separator.$post_data;
125 125
 	} else {
126 126
 		// Check if POST is empty.
127
-		if ( empty( $_POST ) ) {
127
+		if (empty($_POST)) {
128 128
 			// Nothing to do.
129 129
 			return;
130 130
 		} else {
131 131
 			// Loop through each POST.
132
-			foreach ( $_POST as $key => $value ) {
132
+			foreach ($_POST as $key => $value) {
133 133
 				// Encode the value and append the data.
134
-				$encoded_data .= $arg_separator . "$key=" . urlencode( $value );
134
+				$encoded_data .= $arg_separator."$key=".urlencode($value);
135 135
 			}
136 136
 		}
137 137
 	}
138 138
 
139 139
 	// Convert collected post data to an array.
140
-	parse_str( $encoded_data, $encoded_data_array );
140
+	parse_str($encoded_data, $encoded_data_array);
141 141
 
142
-	foreach ( $encoded_data_array as $key => $value ) {
142
+	foreach ($encoded_data_array as $key => $value) {
143 143
 
144
-		if ( false !== strpos( $key, 'amp;' ) ) {
145
-			$new_key = str_replace( '&amp;', '&', $key );
146
-			$new_key = str_replace( 'amp;', '&', $new_key );
144
+		if (false !== strpos($key, 'amp;')) {
145
+			$new_key = str_replace('&amp;', '&', $key);
146
+			$new_key = str_replace('amp;', '&', $new_key);
147 147
 
148
-			unset( $encoded_data_array[ $key ] );
149
-			$encoded_data_array[ $new_key ] = $value;
148
+			unset($encoded_data_array[$key]);
149
+			$encoded_data_array[$new_key] = $value;
150 150
 		}
151 151
 	}
152 152
 
153 153
 	$api_response = false;
154 154
 
155 155
 	// Validate IPN request w/ PayPal if user hasn't disabled this security measure.
156
-	if ( give_is_setting_enabled( give_get_option( 'paypal_verification' ) ) ) {
156
+	if (give_is_setting_enabled(give_get_option('paypal_verification'))) {
157 157
 
158 158
 		$remote_post_vars = array(
159 159
 			'method'      => 'POST',
@@ -173,25 +173,25 @@  discard block
 block discarded – undo
173 173
 		);
174 174
 
175 175
 		// Validate the IPN.
176
-		$api_response = wp_remote_post( give_get_paypal_redirect(), $remote_post_vars );
176
+		$api_response = wp_remote_post(give_get_paypal_redirect(), $remote_post_vars);
177 177
 
178
-		if ( is_wp_error( $api_response ) ) {
179
-			give_record_gateway_error( __( 'IPN Error', 'give' ), sprintf( /* translators: %s: Paypal IPN response */
180
-				__( 'Invalid IPN verification response. IPN data: %s', 'give' ), json_encode( $api_response ) ) );
178
+		if (is_wp_error($api_response)) {
179
+			give_record_gateway_error(__('IPN Error', 'give'), sprintf( /* translators: %s: Paypal IPN response */
180
+				__('Invalid IPN verification response. IPN data: %s', 'give'), json_encode($api_response) ));
181 181
 
182 182
 			return; // Something went wrong.
183 183
 		}
184 184
 
185
-		if ( 'VERIFIED' !== $api_response['body'] ) {
186
-			give_record_gateway_error( __( 'IPN Error', 'give' ), sprintf( /* translators: %s: Paypal IPN response */
187
-				__( 'Invalid IPN verification response. IPN data: %s', 'give' ), json_encode( $api_response ) ) );
185
+		if ('VERIFIED' !== $api_response['body']) {
186
+			give_record_gateway_error(__('IPN Error', 'give'), sprintf( /* translators: %s: Paypal IPN response */
187
+				__('Invalid IPN verification response. IPN data: %s', 'give'), json_encode($api_response) ));
188 188
 
189 189
 			return; // Response not okay.
190 190
 		}
191 191
 	}// End if().
192 192
 
193 193
 	// Check if $post_data_array has been populated.
194
-	if ( ! is_array( $encoded_data_array ) && ! empty( $encoded_data_array ) ) {
194
+	if ( ! is_array($encoded_data_array) && ! empty($encoded_data_array)) {
195 195
 		return;
196 196
 	}
197 197
 
@@ -200,28 +200,28 @@  discard block
 block discarded – undo
200 200
 		'payment_status' => '',
201 201
 	);
202 202
 
203
-	$encoded_data_array = wp_parse_args( $encoded_data_array, $defaults );
203
+	$encoded_data_array = wp_parse_args($encoded_data_array, $defaults);
204 204
 
205
-	$payment_id = isset( $encoded_data_array['custom'] ) ? absint( $encoded_data_array['custom'] ) : 0;
205
+	$payment_id = isset($encoded_data_array['custom']) ? absint($encoded_data_array['custom']) : 0;
206 206
 	$txn_type   = $encoded_data_array['txn_type'];
207 207
 
208 208
 	// Check for PayPal IPN Notifications and update data based on it.
209
-	$current_timestamp = current_time( 'timestamp' );
209
+	$current_timestamp = current_time('timestamp');
210 210
 	$paypal_ipn_vars   = array(
211
-		'auth_status'    => isset( $api_response['body'] ) ? $api_response['body'] : 'N/A',
212
-		'transaction_id' => isset( $encoded_data_array['txn_id'] ) ? $encoded_data_array['txn_id'] : 'N/A',
211
+		'auth_status'    => isset($api_response['body']) ? $api_response['body'] : 'N/A',
212
+		'transaction_id' => isset($encoded_data_array['txn_id']) ? $encoded_data_array['txn_id'] : 'N/A',
213 213
 		'payment_id'     => $payment_id,
214 214
 	);
215
-	update_option( 'give_last_paypal_ipn_received', $paypal_ipn_vars );
216
-	give_insert_payment_note( $payment_id, sprintf(
217
-			__( 'IPN received on %s at %s', 'give' ),
218
-			date_i18n( 'm/d/Y', $current_timestamp ),
219
-			date_i18n( 'H:i', $current_timestamp )
215
+	update_option('give_last_paypal_ipn_received', $paypal_ipn_vars);
216
+	give_insert_payment_note($payment_id, sprintf(
217
+			__('IPN received on %s at %s', 'give'),
218
+			date_i18n('m/d/Y', $current_timestamp),
219
+			date_i18n('H:i', $current_timestamp)
220 220
 		)
221 221
 	);
222
-	give_update_meta( $payment_id, 'give_last_paypal_ipn_received', $current_timestamp );
222
+	give_update_meta($payment_id, 'give_last_paypal_ipn_received', $current_timestamp);
223 223
 
224
-	if ( has_action( 'give_paypal_' . $txn_type ) ) {
224
+	if (has_action('give_paypal_'.$txn_type)) {
225 225
 		/**
226 226
 		 * Fires while processing PayPal IPN $txn_type.
227 227
 		 *
@@ -232,7 +232,7 @@  discard block
 block discarded – undo
232 232
 		 * @param array $encoded_data_array Encoded data.
233 233
 		 * @param int   $payment_id         Payment id.
234 234
 		 */
235
-		do_action( "give_paypal_{$txn_type}", $encoded_data_array, $payment_id );
235
+		do_action("give_paypal_{$txn_type}", $encoded_data_array, $payment_id);
236 236
 	} else {
237 237
 		/**
238 238
 		 * Fires while process PayPal IPN.
@@ -244,12 +244,12 @@  discard block
 block discarded – undo
244 244
 		 * @param array $encoded_data_array Encoded data.
245 245
 		 * @param int   $payment_id         Payment id.
246 246
 		 */
247
-		do_action( 'give_paypal_web_accept', $encoded_data_array, $payment_id );
247
+		do_action('give_paypal_web_accept', $encoded_data_array, $payment_id);
248 248
 	}
249 249
 	exit;
250 250
 }
251 251
 
252
-add_action( 'give_verify_paypal_ipn', 'give_process_paypal_ipn' );
252
+add_action('give_verify_paypal_ipn', 'give_process_paypal_ipn');
253 253
 
254 254
 /**
255 255
  * Process web accept (one time) payment IPNs.
@@ -261,99 +261,99 @@  discard block
 block discarded – undo
261 261
  *
262 262
  * @return void
263 263
  */
264
-function give_process_paypal_web_accept( $data, $payment_id ) {
264
+function give_process_paypal_web_accept($data, $payment_id) {
265 265
 
266 266
 	// Only allow through these transaction types.
267
-	if ( 'web_accept' !== $data['txn_type'] && 'cart' !== $data['txn_type'] && 'refunded' !== strtolower( $data['payment_status'] ) ) {
267
+	if ('web_accept' !== $data['txn_type'] && 'cart' !== $data['txn_type'] && 'refunded' !== strtolower($data['payment_status'])) {
268 268
 		return;
269 269
 	}
270 270
 
271 271
 	// Need $payment_id to continue.
272
-	if ( empty( $payment_id ) ) {
272
+	if (empty($payment_id)) {
273 273
 		return;
274 274
 	}
275 275
 
276 276
 	// Collect donation payment details.
277 277
 	$paypal_amount  = $data['mc_gross'];
278
-	$payment_status = strtolower( $data['payment_status'] );
279
-	$currency_code  = strtolower( $data['mc_currency'] );
280
-	$business_email = isset( $data['business'] ) && is_email( $data['business'] ) ? trim( $data['business'] ) : trim( $data['receiver_email'] );
281
-	$payment_meta   = give_get_payment_meta( $payment_id );
278
+	$payment_status = strtolower($data['payment_status']);
279
+	$currency_code  = strtolower($data['mc_currency']);
280
+	$business_email = isset($data['business']) && is_email($data['business']) ? trim($data['business']) : trim($data['receiver_email']);
281
+	$payment_meta   = give_get_payment_meta($payment_id);
282 282
 
283 283
 	// Must be a PayPal standard IPN.
284
-	if ( 'paypal' !== give_get_payment_gateway( $payment_id ) ) {
284
+	if ('paypal' !== give_get_payment_gateway($payment_id)) {
285 285
 		return;
286 286
 	}
287 287
 
288 288
 	// Verify payment recipient.
289
-	if ( strcasecmp( $business_email, trim( give_get_option( 'paypal_email' ) ) ) !== 0 ) {
289
+	if (strcasecmp($business_email, trim(give_get_option('paypal_email'))) !== 0) {
290 290
 
291
-		give_record_gateway_error( __( 'IPN Error', 'give' ), sprintf( /* translators: %s: Paypal IPN response */
292
-			__( 'Invalid business email in IPN response. IPN data: %s', 'give' ), json_encode( $data ) ), $payment_id );
293
-		give_update_payment_status( $payment_id, 'failed' );
294
-		give_insert_payment_note( $payment_id, __( 'Payment failed due to invalid PayPal business email.', 'give' ) );
291
+		give_record_gateway_error(__('IPN Error', 'give'), sprintf( /* translators: %s: Paypal IPN response */
292
+			__('Invalid business email in IPN response. IPN data: %s', 'give'), json_encode($data) ), $payment_id);
293
+		give_update_payment_status($payment_id, 'failed');
294
+		give_insert_payment_note($payment_id, __('Payment failed due to invalid PayPal business email.', 'give'));
295 295
 
296 296
 		return;
297 297
 	}
298 298
 
299 299
 	// Verify payment currency.
300
-	if ( $currency_code !== strtolower( $payment_meta['currency'] ) ) {
300
+	if ($currency_code !== strtolower($payment_meta['currency'])) {
301 301
 
302
-		give_record_gateway_error( __( 'IPN Error', 'give' ), sprintf( /* translators: %s: Paypal IPN response */
303
-			__( 'Invalid currency in IPN response. IPN data: %s', 'give' ), json_encode( $data ) ), $payment_id );
304
-		give_update_payment_status( $payment_id, 'failed' );
305
-		give_insert_payment_note( $payment_id, __( 'Payment failed due to invalid currency in PayPal IPN.', 'give' ) );
302
+		give_record_gateway_error(__('IPN Error', 'give'), sprintf( /* translators: %s: Paypal IPN response */
303
+			__('Invalid currency in IPN response. IPN data: %s', 'give'), json_encode($data) ), $payment_id);
304
+		give_update_payment_status($payment_id, 'failed');
305
+		give_insert_payment_note($payment_id, __('Payment failed due to invalid currency in PayPal IPN.', 'give'));
306 306
 
307 307
 		return;
308 308
 	}
309 309
 
310 310
 	// Process refunds & reversed.
311
-	if ( 'refunded' === $payment_status || 'reversed' === $payment_status ) {
312
-		give_process_paypal_refund( $data, $payment_id );
311
+	if ('refunded' === $payment_status || 'reversed' === $payment_status) {
312
+		give_process_paypal_refund($data, $payment_id);
313 313
 
314 314
 		return;
315 315
 	}
316 316
 
317 317
 	// Only complete payments once.
318
-	if ( 'publish' === get_post_status( $payment_id ) ) {
318
+	if ('publish' === get_post_status($payment_id)) {
319 319
 		return;
320 320
 	}
321 321
 
322 322
 	// Retrieve the total donation amount (before PayPal).
323
-	$payment_amount = give_donation_amount( $payment_id );
323
+	$payment_amount = give_donation_amount($payment_id);
324 324
 
325 325
 	// Check that the donation PP and local db amounts match.
326
-	if ( number_format( (float) $paypal_amount, 2 ) < number_format( (float) $payment_amount, 2 ) ) {
326
+	if (number_format((float) $paypal_amount, 2) < number_format((float) $payment_amount, 2)) {
327 327
 		// The prices don't match
328
-		give_record_gateway_error( __( 'IPN Error', 'give' ), sprintf( /* translators: %s: Paypal IPN response */
329
-			__( 'Invalid payment amount in IPN response. IPN data: %s', 'give' ), json_encode( $data ) ), $payment_id );
330
-		give_update_payment_status( $payment_id, 'failed' );
331
-		give_insert_payment_note( $payment_id, __( 'Payment failed due to invalid amount in PayPal IPN.', 'give' ) );
328
+		give_record_gateway_error(__('IPN Error', 'give'), sprintf( /* translators: %s: Paypal IPN response */
329
+			__('Invalid payment amount in IPN response. IPN data: %s', 'give'), json_encode($data) ), $payment_id);
330
+		give_update_payment_status($payment_id, 'failed');
331
+		give_insert_payment_note($payment_id, __('Payment failed due to invalid amount in PayPal IPN.', 'give'));
332 332
 
333 333
 		return;
334 334
 	}
335 335
 
336 336
 	// Process completed donations.
337
-	if ( 'completed' === $payment_status || give_is_test_mode() ) {
337
+	if ('completed' === $payment_status || give_is_test_mode()) {
338 338
 
339
-		give_insert_payment_note( $payment_id, sprintf( /* translators: %s: Paypal transaction ID */
340
-			__( 'PayPal Transaction ID: %s', 'give' ), $data['txn_id'] ) );
341
-		give_set_payment_transaction_id( $payment_id, $data['txn_id'] );
342
-		give_update_payment_status( $payment_id, 'publish' );
339
+		give_insert_payment_note($payment_id, sprintf( /* translators: %s: Paypal transaction ID */
340
+			__('PayPal Transaction ID: %s', 'give'), $data['txn_id'] ));
341
+		give_set_payment_transaction_id($payment_id, $data['txn_id']);
342
+		give_update_payment_status($payment_id, 'publish');
343 343
 
344
-	} elseif ( 'pending' === $payment_status && isset( $data['pending_reason'] ) ) {
344
+	} elseif ('pending' === $payment_status && isset($data['pending_reason'])) {
345 345
 
346 346
 		// Look for possible pending reasons, such as an echeck.
347
-		$note = give_paypal_get_pending_donation_note( strtolower( $data['pending_reason'] ) );
347
+		$note = give_paypal_get_pending_donation_note(strtolower($data['pending_reason']));
348 348
 
349
-		if ( ! empty( $note ) ) {
350
-			give_insert_payment_note( $payment_id, $note );
349
+		if ( ! empty($note)) {
350
+			give_insert_payment_note($payment_id, $note);
351 351
 		}
352 352
 	}
353 353
 
354 354
 }
355 355
 
356
-add_action( 'give_paypal_web_accept', 'give_process_paypal_web_accept', 10, 2 );
356
+add_action('give_paypal_web_accept', 'give_process_paypal_web_accept', 10, 2);
357 357
 
358 358
 /**
359 359
  * Process PayPal IPN Refunds
@@ -365,35 +365,35 @@  discard block
 block discarded – undo
365 365
  *
366 366
  * @return void
367 367
  */
368
-function give_process_paypal_refund( $data, $payment_id = 0 ) {
368
+function give_process_paypal_refund($data, $payment_id = 0) {
369 369
 
370 370
 	// Collect payment details.
371
-	if ( empty( $payment_id ) ) {
371
+	if (empty($payment_id)) {
372 372
 		return;
373 373
 	}
374 374
 
375 375
 	// Only refund payments once.
376
-	if ( 'refunded' === get_post_status( $payment_id ) ) {
376
+	if ('refunded' === get_post_status($payment_id)) {
377 377
 		return;
378 378
 	}
379 379
 
380
-	$payment_amount = give_donation_amount( $payment_id );
380
+	$payment_amount = give_donation_amount($payment_id);
381 381
 	$refund_amount  = $data['payment_gross'] * - 1;
382 382
 
383
-	if ( number_format( (float) $refund_amount, 2 ) < number_format( (float) $payment_amount, 2 ) ) {
383
+	if (number_format((float) $refund_amount, 2) < number_format((float) $payment_amount, 2)) {
384 384
 
385
-		give_insert_payment_note( $payment_id, sprintf( /* translators: %s: Paypal parent transaction ID */
386
-			__( 'Partial PayPal refund processed: %s', 'give' ), $data['parent_txn_id'] ) );
385
+		give_insert_payment_note($payment_id, sprintf( /* translators: %s: Paypal parent transaction ID */
386
+			__('Partial PayPal refund processed: %s', 'give'), $data['parent_txn_id'] ));
387 387
 
388 388
 		return; // This is a partial refund
389 389
 
390 390
 	}
391 391
 
392
-	give_insert_payment_note( $payment_id, sprintf( /* translators: 1: Paypal parent transaction ID 2. Paypal reason code */
393
-		__( 'PayPal Payment #%1$s Refunded for reason: %2$s', 'give' ), $data['parent_txn_id'], $data['reason_code'] ) );
394
-	give_insert_payment_note( $payment_id, sprintf( /* translators: %s: Paypal transaction ID */
395
-		__( 'PayPal Refund Transaction ID: %s', 'give' ), $data['txn_id'] ) );
396
-	give_update_payment_status( $payment_id, 'refunded' );
392
+	give_insert_payment_note($payment_id, sprintf( /* translators: 1: Paypal parent transaction ID 2. Paypal reason code */
393
+		__('PayPal Payment #%1$s Refunded for reason: %2$s', 'give'), $data['parent_txn_id'], $data['reason_code'] ));
394
+	give_insert_payment_note($payment_id, sprintf( /* translators: %s: Paypal transaction ID */
395
+		__('PayPal Refund Transaction ID: %s', 'give'), $data['txn_id'] ));
396
+	give_update_payment_status($payment_id, 'refunded');
397 397
 }
398 398
 
399 399
 /**
@@ -405,24 +405,24 @@  discard block
 block discarded – undo
405 405
  *
406 406
  * @return string
407 407
  */
408
-function give_get_paypal_redirect( $ssl_check = false ) {
408
+function give_get_paypal_redirect($ssl_check = false) {
409 409
 
410
-	if ( is_ssl() || ! $ssl_check ) {
410
+	if (is_ssl() || ! $ssl_check) {
411 411
 		$protocol = 'https://';
412 412
 	} else {
413 413
 		$protocol = 'http://';
414 414
 	}
415 415
 
416 416
 	// Check the current payment mode
417
-	if ( give_is_test_mode() ) {
417
+	if (give_is_test_mode()) {
418 418
 		// Test mode
419
-		$paypal_uri = $protocol . 'www.sandbox.paypal.com/cgi-bin/webscr';
419
+		$paypal_uri = $protocol.'www.sandbox.paypal.com/cgi-bin/webscr';
420 420
 	} else {
421 421
 		// Live mode
422
-		$paypal_uri = $protocol . 'www.paypal.com/cgi-bin/webscr';
422
+		$paypal_uri = $protocol.'www.paypal.com/cgi-bin/webscr';
423 423
 	}
424 424
 
425
-	return apply_filters( 'give_paypal_uri', $paypal_uri );
425
+	return apply_filters('give_paypal_uri', $paypal_uri);
426 426
 }
427 427
 
428 428
 /**
@@ -432,9 +432,9 @@  discard block
 block discarded – undo
432 432
  * @return string
433 433
  */
434 434
 function give_get_paypal_page_style() {
435
-	$page_style = trim( give_get_option( 'paypal_page_style', 'PayPal' ) );
435
+	$page_style = trim(give_get_option('paypal_page_style', 'PayPal'));
436 436
 
437
-	return apply_filters( 'give_paypal_page_style', $page_style );
437
+	return apply_filters('give_paypal_page_style', $page_style);
438 438
 }
439 439
 
440 440
 /**
@@ -448,26 +448,26 @@  discard block
 block discarded – undo
448 448
  *
449 449
  * @return string
450 450
  */
451
-function give_paypal_success_page_content( $content ) {
451
+function give_paypal_success_page_content($content) {
452 452
 
453
-	if ( ! isset( $_GET['payment-id'] ) && ! give_get_purchase_session() ) {
453
+	if ( ! isset($_GET['payment-id']) && ! give_get_purchase_session()) {
454 454
 		return $content;
455 455
 	}
456 456
 
457
-	$payment_id = isset( $_GET['payment-id'] ) ? absint( $_GET['payment-id'] ) : false;
457
+	$payment_id = isset($_GET['payment-id']) ? absint($_GET['payment-id']) : false;
458 458
 
459
-	if ( ! $payment_id ) {
459
+	if ( ! $payment_id) {
460 460
 		$session    = give_get_purchase_session();
461
-		$payment_id = give_get_donation_id_by_key( $session['purchase_key'] );
461
+		$payment_id = give_get_donation_id_by_key($session['purchase_key']);
462 462
 	}
463 463
 
464
-	$payment = get_post( $payment_id );
465
-	if ( $payment && 'pending' === $payment->post_status ) {
464
+	$payment = get_post($payment_id);
465
+	if ($payment && 'pending' === $payment->post_status) {
466 466
 
467 467
 		// Payment is still pending so show processing indicator to fix the race condition.
468 468
 		ob_start();
469 469
 
470
-		give_get_template_part( 'payment', 'processing' );
470
+		give_get_template_part('payment', 'processing');
471 471
 
472 472
 		$content = ob_get_clean();
473 473
 
@@ -477,7 +477,7 @@  discard block
 block discarded – undo
477 477
 
478 478
 }
479 479
 
480
-add_filter( 'give_payment_confirm_paypal', 'give_paypal_success_page_content' );
480
+add_filter('give_payment_confirm_paypal', 'give_paypal_success_page_content');
481 481
 
482 482
 /**
483 483
  * Given a transaction ID, generate a link to the PayPal transaction ID details
@@ -489,16 +489,16 @@  discard block
 block discarded – undo
489 489
  *
490 490
  * @return string                 A link to the PayPal transaction details
491 491
  */
492
-function give_paypal_link_transaction_id( $transaction_id, $payment_id ) {
492
+function give_paypal_link_transaction_id($transaction_id, $payment_id) {
493 493
 
494 494
 	$paypal_base_url = 'https://history.paypal.com/cgi-bin/webscr?cmd=_history-details-from-hub&id=';
495
-	$transaction_url = '<a href="' . esc_url( $paypal_base_url . $transaction_id ) . '" target="_blank">' . $transaction_id . '</a>';
495
+	$transaction_url = '<a href="'.esc_url($paypal_base_url.$transaction_id).'" target="_blank">'.$transaction_id.'</a>';
496 496
 
497
-	return apply_filters( 'give_paypal_link_payment_details_transaction_id', $transaction_url );
497
+	return apply_filters('give_paypal_link_payment_details_transaction_id', $transaction_url);
498 498
 
499 499
 }
500 500
 
501
-add_filter( 'give_payment_details_transaction_id-paypal', 'give_paypal_link_transaction_id', 10, 2 );
501
+add_filter('give_payment_details_transaction_id-paypal', 'give_paypal_link_transaction_id', 10, 2);
502 502
 
503 503
 
504 504
 /**
@@ -510,64 +510,64 @@  discard block
 block discarded – undo
510 510
  *
511 511
  * @return string
512 512
  */
513
-function give_paypal_get_pending_donation_note( $pending_reason ) {
513
+function give_paypal_get_pending_donation_note($pending_reason) {
514 514
 
515 515
 	$note = '';
516 516
 
517
-	switch ( $pending_reason ) {
517
+	switch ($pending_reason) {
518 518
 
519 519
 		case 'echeck' :
520 520
 
521
-			$note = __( 'Payment made via eCheck and will clear automatically in 5-8 days.', 'give' );
521
+			$note = __('Payment made via eCheck and will clear automatically in 5-8 days.', 'give');
522 522
 
523 523
 			break;
524 524
 
525 525
 		case 'address' :
526 526
 
527
-			$note = __( 'Payment requires a confirmed donor address and must be accepted manually through PayPal.', 'give' );
527
+			$note = __('Payment requires a confirmed donor address and must be accepted manually through PayPal.', 'give');
528 528
 
529 529
 			break;
530 530
 
531 531
 		case 'intl' :
532 532
 
533
-			$note = __( 'Payment must be accepted manually through PayPal due to international account regulations.', 'give' );
533
+			$note = __('Payment must be accepted manually through PayPal due to international account regulations.', 'give');
534 534
 
535 535
 			break;
536 536
 
537 537
 		case 'multi-currency' :
538 538
 
539
-			$note = __( 'Payment received in non-shop currency and must be accepted manually through PayPal.', 'give' );
539
+			$note = __('Payment received in non-shop currency and must be accepted manually through PayPal.', 'give');
540 540
 
541 541
 			break;
542 542
 
543 543
 		case 'paymentreview' :
544 544
 		case 'regulatory_review' :
545 545
 
546
-			$note = __( 'Payment is being reviewed by PayPal staff as high-risk or in possible violation of government regulations.', 'give' );
546
+			$note = __('Payment is being reviewed by PayPal staff as high-risk or in possible violation of government regulations.', 'give');
547 547
 
548 548
 			break;
549 549
 
550 550
 		case 'unilateral' :
551 551
 
552
-			$note = __( 'Payment was sent to non-confirmed or non-registered email address.', 'give' );
552
+			$note = __('Payment was sent to non-confirmed or non-registered email address.', 'give');
553 553
 
554 554
 			break;
555 555
 
556 556
 		case 'upgrade' :
557 557
 
558
-			$note = __( 'PayPal account must be upgraded before this payment can be accepted.', 'give' );
558
+			$note = __('PayPal account must be upgraded before this payment can be accepted.', 'give');
559 559
 
560 560
 			break;
561 561
 
562 562
 		case 'verify' :
563 563
 
564
-			$note = __( 'PayPal account is not verified. Verify account in order to accept this donation.', 'give' );
564
+			$note = __('PayPal account is not verified. Verify account in order to accept this donation.', 'give');
565 565
 
566 566
 			break;
567 567
 
568 568
 		case 'other' :
569 569
 
570
-			$note = __( 'Payment is pending for unknown reasons. Contact PayPal support for assistance.', 'give' );
570
+			$note = __('Payment is pending for unknown reasons. Contact PayPal support for assistance.', 'give');
571 571
 
572 572
 			break;
573 573
 
@@ -585,49 +585,49 @@  discard block
 block discarded – undo
585 585
  *
586 586
  * @return mixed|string
587 587
  */
588
-function give_build_paypal_url( $payment_id, $payment_data ) {
588
+function give_build_paypal_url($payment_id, $payment_data) {
589 589
 	// Only send to PayPal if the pending payment is created successfully.
590
-	$listener_url = add_query_arg( 'give-listener', 'IPN', home_url( 'index.php' ) );
590
+	$listener_url = add_query_arg('give-listener', 'IPN', home_url('index.php'));
591 591
 
592 592
 	// Get the success url.
593
-	$return_url = add_query_arg( array(
593
+	$return_url = add_query_arg(array(
594 594
 		'payment-confirmation' => 'paypal',
595 595
 		'payment-id'           => $payment_id,
596 596
 
597
-	), get_permalink( give_get_option( 'success_page' ) ) );
597
+	), get_permalink(give_get_option('success_page')));
598 598
 
599 599
 	// Get the PayPal redirect uri.
600
-	$paypal_redirect = trailingslashit( give_get_paypal_redirect() ) . '?';
600
+	$paypal_redirect = trailingslashit(give_get_paypal_redirect()).'?';
601 601
 
602 602
 	// Item name.
603
-	$item_name = give_payment_gateway_item_title( $payment_data );
603
+	$item_name = give_payment_gateway_item_title($payment_data);
604 604
 
605 605
 	// Setup PayPal API params.
606 606
 	$paypal_args = array(
607
-		'business'      => give_get_option( 'paypal_email', false ),
607
+		'business'      => give_get_option('paypal_email', false),
608 608
 		'first_name'    => $payment_data['user_info']['first_name'],
609 609
 		'last_name'     => $payment_data['user_info']['last_name'],
610 610
 		'email'         => $payment_data['user_email'],
611 611
 		'invoice'       => $payment_data['purchase_key'],
612 612
 		'amount'        => $payment_data['price'],
613
-		'item_name'     => stripslashes( $item_name ),
613
+		'item_name'     => stripslashes($item_name),
614 614
 		'no_shipping'   => '1',
615 615
 		'shipping'      => '0',
616 616
 		'no_note'       => '1',
617
-		'currency_code' => give_get_currency( $payment_id, $payment_data ),
618
-		'charset'       => get_bloginfo( 'charset' ),
617
+		'currency_code' => give_get_currency($payment_id, $payment_data),
618
+		'charset'       => get_bloginfo('charset'),
619 619
 		'custom'        => $payment_id,
620 620
 		'rm'            => '2',
621 621
 		'return'        => $return_url,
622
-		'cancel_return' => give_get_failed_transaction_uri( '?payment-id=' . $payment_id ),
622
+		'cancel_return' => give_get_failed_transaction_uri('?payment-id='.$payment_id),
623 623
 		'notify_url'    => $listener_url,
624 624
 		'page_style'    => give_get_paypal_page_style(),
625
-		'cbt'           => get_bloginfo( 'name' ),
625
+		'cbt'           => get_bloginfo('name'),
626 626
 		'bn'            => 'givewp_SP',
627 627
 	);
628 628
 
629 629
 	// Add user address if present.
630
-	if ( ! empty( $payment_data['user_info']['address'] ) ) {
630
+	if ( ! empty($payment_data['user_info']['address'])) {
631 631
 		$default_address = array(
632 632
 			'line1'   => '',
633 633
 			'line2'   => '',
@@ -637,7 +637,7 @@  discard block
 block discarded – undo
637 637
 			'country' => '',
638 638
 		);
639 639
 
640
-		$address = wp_parse_args( $payment_data['user_info']['address'], $default_address );
640
+		$address = wp_parse_args($payment_data['user_info']['address'], $default_address);
641 641
 
642 642
 		$paypal_args['address1'] = $address['line1'];
643 643
 		$paypal_args['address2'] = $address['line2'];
@@ -658,13 +658,13 @@  discard block
 block discarded – undo
658 658
 	 *
659 659
 	 * @since 1.8
660 660
 	 */
661
-	$paypal_args = apply_filters( 'give_paypal_redirect_args', $paypal_args, $payment_data );
661
+	$paypal_args = apply_filters('give_paypal_redirect_args', $paypal_args, $payment_data);
662 662
 
663 663
 	// Build query.
664
-	$paypal_redirect .= http_build_query( $paypal_args );
664
+	$paypal_redirect .= http_build_query($paypal_args);
665 665
 
666 666
 	// Fix for some sites that encode the entities.
667
-	$paypal_redirect = str_replace( '&amp;', '&', $paypal_redirect );
667
+	$paypal_redirect = str_replace('&amp;', '&', $paypal_redirect);
668 668
 
669 669
 	return $paypal_redirect;
670 670
 }
@@ -679,7 +679,7 @@  discard block
 block discarded – undo
679 679
 function give_get_paypal_button_type() {
680 680
 	// paypal_button_type can be donation or standard.
681 681
 	$paypal_button_type = '_donations';
682
-	if ( 'standard' === give_get_option( 'paypal_button_type' ) ) {
682
+	if ('standard' === give_get_option('paypal_button_type')) {
683 683
 		$paypal_button_type = '_xclick';
684 684
 	}
685 685
 
Please login to merge, or discard this patch.
includes/admin/settings/class-settings-addon.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -9,11 +9,11 @@  discard block
 block discarded – undo
9 9
  * @since       1.8
10 10
  */
11 11
 
12
-if ( ! defined( 'ABSPATH' ) ) {
12
+if ( ! defined('ABSPATH')) {
13 13
 	exit; // Exit if accessed directly
14 14
 }
15 15
 
16
-if ( ! class_exists( 'Give_Settings_Addon' ) ) :
16
+if ( ! class_exists('Give_Settings_Addon')) :
17 17
 
18 18
 	/**
19 19
 	 * Give_Settings_Addon.
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
 		 */
27 27
 		public function __construct() {
28 28
 			$this->id    = 'addons';
29
-			$this->label = esc_html__( 'Add-ons', 'give' );
29
+			$this->label = esc_html__('Add-ons', 'give');
30 30
 
31 31
 			parent::__construct();
32 32
 		}
@@ -38,12 +38,12 @@  discard block
 block discarded – undo
38 38
 		 * @param  $setting_tab
39 39
 		 * @return string
40 40
 		 */
41
-		function set_default_setting_tab( $setting_tab ) {
41
+		function set_default_setting_tab($setting_tab) {
42 42
 			$default_tab = '';
43 43
 
44 44
 			// Set default tab to first setting tab.
45
-			if( $sections = array_keys( $this->get_sections() ) ) {
46
-				$default_tab = current( $sections );
45
+			if ($sections = array_keys($this->get_sections())) {
46
+				$default_tab = current($sections);
47 47
 			}
48 48
 			return $default_tab;
49 49
 		}
@@ -55,11 +55,11 @@  discard block
 block discarded – undo
55 55
 		 * @param  array $pages Lst of pages.
56 56
 		 * @return array
57 57
 		 */
58
-		public function add_settings_page( $pages ) {
58
+		public function add_settings_page($pages) {
59 59
 			$setting = $this->get_settings();
60 60
 			// Bailout: Do not add addons setting tab if it does not contain any setting fields.
61
-			if( ! empty( $setting ) ) {
62
-				$pages[ $this->id ] = $this->label;
61
+			if ( ! empty($setting)) {
62
+				$pages[$this->id] = $this->label;
63 63
 			}
64 64
 
65 65
 			return $pages;
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
 			 * Filter the addons settings.
79 79
 			 * Backward compatibility: Please do not use this filter. This filter is deprecated in 1.8
80 80
 			 */
81
-			$settings = apply_filters( 'give_settings_addons', $settings );
81
+			$settings = apply_filters('give_settings_addons', $settings);
82 82
 
83 83
 			/**
84 84
 			 * Filter the settings.
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
 			 * @since  1.8
87 87
 			 * @param  array $settings
88 88
 			 */
89
-			$settings = apply_filters( 'give_get_settings_' . $this->id, $settings );
89
+			$settings = apply_filters('give_get_settings_'.$this->id, $settings);
90 90
 
91 91
 			// Output.
92 92
 			return $settings;
Please login to merge, or discard this patch.
includes/admin/forms/metabox.php 1 patch
Spacing   +6 added lines, -6 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
 
@@ -22,19 +22,19 @@  discard block
 block discarded – undo
22 22
  */
23 23
 function give_add_shortcode_to_publish_metabox() {
24 24
 
25
-	if ( 'give_forms' !== get_post_type() ) {
25
+	if ('give_forms' !== get_post_type()) {
26 26
 		return false;
27 27
 	}
28 28
 	global $post;
29 29
 
30 30
 	//Only enqueue scripts for CPT on post type screen
31
-	if ( 'give_forms' === $post->post_type ) {
31
+	if ('give_forms' === $post->post_type) {
32 32
 		//Shortcode column with select all input
33
-		$shortcode = htmlentities( '[give_form id="' . $post->ID . '"]' );
34
-		echo '<div class="shortcode-wrap box-sizing"><label for="shortcode-input">' . esc_html__( 'Give Form Shortcode:', 'give' ) . '</label><input onClick="this.setSelectionRange(0, this.value.length)" type="text" name="shortcode-input" id="shortcode-input" class="shortcode-input" readonly value="' . $shortcode . '"></div>';
33
+		$shortcode = htmlentities('[give_form id="'.$post->ID.'"]');
34
+		echo '<div class="shortcode-wrap box-sizing"><label for="shortcode-input">'.esc_html__('Give Form Shortcode:', 'give').'</label><input onClick="this.setSelectionRange(0, this.value.length)" type="text" name="shortcode-input" id="shortcode-input" class="shortcode-input" readonly value="'.$shortcode.'"></div>';
35 35
 
36 36
 	}
37 37
 
38 38
 }
39 39
 
40
-add_action( 'post_submitbox_misc_actions', 'give_add_shortcode_to_publish_metabox' );
40
+add_action('post_submitbox_misc_actions', 'give_add_shortcode_to_publish_metabox');
Please login to merge, or discard this patch.