Test Failed
Push — master ( f5256c...25a383 )
by Devin
07:02
created
includes/class-give-donor-wall-widget.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
  */
11 11
 
12 12
 // Exit if accessed directly.
13
-if ( ! defined( 'ABSPATH' ) ) {
13
+if ( ! defined('ABSPATH')) {
14 14
 	exit;
15 15
 }
16 16
 
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
 		// widget settings
35 35
 		$widget_ops = array(
36 36
 			'classname'   => 'give-donors-gravatars',
37
-			'description' => esc_html__( 'Displays gravatars of people who have donated using your your form. Will only show on the single form page.', 'give' ),
37
+			'description' => esc_html__('Displays gravatars of people who have donated using your your form. Will only show on the single form page.', 'give'),
38 38
 		);
39 39
 
40 40
 		// widget control settings
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
 		// create the widget
48 48
 		parent::__construct(
49 49
 			'give_donors_gravatars_widget',
50
-			esc_html__( 'Give Donors Gravatars', 'give' ),
50
+			esc_html__('Give Donors Gravatars', 'give'),
51 51
 			$widget_ops,
52 52
 			$control_ops
53 53
 		);
@@ -67,29 +67,29 @@  discard block
 block discarded – undo
67 67
 	 *
68 68
 	 * @return void
69 69
 	 */
70
-	public function widget( $args, $instance ) {
70
+	public function widget($args, $instance) {
71 71
 
72 72
 		//@TODO: Don't extract it!!!
73
-		extract( $args );
73
+		extract($args);
74 74
 
75
-		if ( ! is_singular( 'give_forms' ) ) {
75
+		if ( ! is_singular('give_forms')) {
76 76
 			return;
77 77
 		}
78 78
 
79 79
 		// Variables from widget settings
80
-		$title = apply_filters( 'widget_title', $instance['title'] );
80
+		$title = apply_filters('widget_title', $instance['title']);
81 81
 
82 82
 		// Used by themes. Opens the widget
83 83
 		echo $before_widget;
84 84
 
85 85
 		// Display the widget title
86
-		if ( $title ) {
87
-			echo $before_title . $title . $after_title;
86
+		if ($title) {
87
+			echo $before_title.$title.$after_title;
88 88
 		}
89 89
 
90 90
 		$gravatars = new Give_Donor_Wall();
91 91
 
92
-		echo $gravatars->gravatars( get_the_ID(), null ); // remove title
92
+		echo $gravatars->gravatars(get_the_ID(), null); // remove title
93 93
 
94 94
 		// Used by themes. Closes the widget
95 95
 		echo $after_widget;
@@ -109,11 +109,11 @@  discard block
 block discarded – undo
109 109
 	 *
110 110
 	 * @return array Updated settings to save.
111 111
 	 */
112
-	public function update( $new_instance, $old_instance ) {
112
+	public function update($new_instance, $old_instance) {
113 113
 
114 114
 		$instance = $old_instance;
115 115
 
116
-		$instance['title'] = strip_tags( $new_instance['title'] );
116
+		$instance['title'] = strip_tags($new_instance['title']);
117 117
 
118 118
 		return $instance;
119 119
 
@@ -131,19 +131,19 @@  discard block
 block discarded – undo
131 131
 	 *
132 132
 	 * @return void
133 133
 	 */
134
-	public function form( $instance ) {
134
+	public function form($instance) {
135 135
 
136 136
 		// Set up some default widget settings.
137 137
 		$defaults = array(
138 138
 			'title' => '',
139 139
 		);
140 140
 
141
-		$instance = wp_parse_args( (array) $instance, $defaults ); ?>
141
+		$instance = wp_parse_args((array) $instance, $defaults); ?>
142 142
 
143 143
 		<!-- Title -->
144 144
 		<p>
145
-			<label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php esc_html_e( 'Title:', 'give' ) ?></label>
146
-			<input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo $instance['title']; ?>" />
145
+			<label for="<?php echo $this->get_field_id('title'); ?>"><?php esc_html_e('Title:', 'give') ?></label>
146
+			<input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo $instance['title']; ?>" />
147 147
 		</p>
148 148
 
149 149
 		<?php
@@ -154,8 +154,8 @@  discard block
 block discarded – undo
154 154
 	 *
155 155
 	 * @return void
156 156
 	 */
157
-	function widget_init(){
158
-		register_widget( $this->self );
157
+	function widget_init() {
158
+		register_widget($this->self);
159 159
 	}
160 160
 
161 161
 }
Please login to merge, or discard this patch.
includes/class-give-license-handler.php 1 patch
Spacing   +153 added lines, -153 removed lines patch added patch discarded remove patch
@@ -10,11 +10,11 @@  discard block
 block discarded – undo
10 10
  */
11 11
 
12 12
 // Exit if accessed directly.
13
-if ( ! defined( 'ABSPATH' ) ) {
13
+if ( ! defined('ABSPATH')) {
14 14
 	exit;
15 15
 }
16 16
 
17
-if ( ! class_exists( 'Give_License' ) ) :
17
+if ( ! class_exists('Give_License')) :
18 18
 
19 19
 	/**
20 20
 	 * Give_License Class
@@ -153,31 +153,31 @@  discard block
 block discarded – undo
153 153
 		 * @param string $_checkout_url
154 154
 		 * @param string $_account_url
155 155
 		 */
156
-		public function __construct( $_file, $_item_name, $_version, $_author, $_optname = null, $_api_url = null, $_checkout_url = null, $_account_url = null ) {
156
+		public function __construct($_file, $_item_name, $_version, $_author, $_optname = null, $_api_url = null, $_checkout_url = null, $_account_url = null) {
157 157
 
158 158
 			$give_options = give_get_settings();
159 159
 
160 160
 			$this->file             = $_file;
161 161
 			$this->item_name        = $_item_name;
162
-			$this->item_shortname   = self::get_short_name( $this->item_name );
162
+			$this->item_shortname   = self::get_short_name($this->item_name);
163 163
 			$this->version          = $_version;
164
-			$this->license          = isset( $give_options[ $this->item_shortname . '_license_key' ] ) ? trim( $give_options[ $this->item_shortname . '_license_key' ] ) : '';
165
-			$this->license_data     = __give_get_active_license_info( $this->item_shortname );
164
+			$this->license          = isset($give_options[$this->item_shortname.'_license_key']) ? trim($give_options[$this->item_shortname.'_license_key']) : '';
165
+			$this->license_data     = __give_get_active_license_info($this->item_shortname);
166 166
 			$this->author           = $_author;
167
-			$this->api_url          = is_null( $_api_url ) ? $this->api_url : $_api_url;
168
-			$this->checkout_url     = is_null( $_checkout_url ) ? $this->checkout_url : $_checkout_url;
169
-			$this->account_url      = is_null( $_account_url ) ? $this->account_url : $_account_url;
167
+			$this->api_url          = is_null($_api_url) ? $this->api_url : $_api_url;
168
+			$this->checkout_url     = is_null($_checkout_url) ? $this->checkout_url : $_checkout_url;
169
+			$this->account_url      = is_null($_account_url) ? $this->account_url : $_account_url;
170 170
 			$this->auto_updater_obj = null;
171 171
 
172 172
 			// Add Setting for Give Add-on activation status.
173
-			$is_addon_activated = get_option( 'give_is_addon_activated' );
174
-			if ( ! $is_addon_activated && is_object( $this ) ) {
175
-				update_option( 'give_is_addon_activated', true, false );
176
-				Give_Cache::set( 'give_cache_hide_license_notice_after_activation', true, DAY_IN_SECONDS );
173
+			$is_addon_activated = get_option('give_is_addon_activated');
174
+			if ( ! $is_addon_activated && is_object($this)) {
175
+				update_option('give_is_addon_activated', true, false);
176
+				Give_Cache::set('give_cache_hide_license_notice_after_activation', true, DAY_IN_SECONDS);
177 177
 			}
178 178
 
179 179
 			// Add plugin to registered licenses list.
180
-			array_push( self::$licensed_addons, plugin_basename( $this->file ) );
180
+			array_push(self::$licensed_addons, plugin_basename($this->file));
181 181
 
182 182
 			// Setup hooks
183 183
 			$this->includes();
@@ -196,9 +196,9 @@  discard block
 block discarded – undo
196 196
 		 *
197 197
 		 * @return string
198 198
 		 */
199
-		public static function get_short_name( $plugin_name ) {
200
-			$plugin_name = trim( str_replace( 'Give - ', '', $plugin_name ) );
201
-			$plugin_name = 'give_' . preg_replace( '/[^a-zA-Z0-9_\s]/', '', str_replace( ' ', '_', strtolower( $plugin_name ) ) );
199
+		public static function get_short_name($plugin_name) {
200
+			$plugin_name = trim(str_replace('Give - ', '', $plugin_name));
201
+			$plugin_name = 'give_'.preg_replace('/[^a-zA-Z0-9_\s]/', '', str_replace(' ', '_', strtolower($plugin_name)));
202 202
 
203 203
 			return $plugin_name;
204 204
 		}
@@ -215,7 +215,7 @@  discard block
 block discarded – undo
215 215
 		 */
216 216
 		private function includes() {
217 217
 
218
-			if ( ! class_exists( 'EDD_SL_Plugin_Updater' ) ) {
218
+			if ( ! class_exists('EDD_SL_Plugin_Updater')) {
219 219
 				require_once 'admin/EDD_SL_Plugin_Updater.php';
220 220
 			}
221 221
 		}
@@ -233,28 +233,28 @@  discard block
 block discarded – undo
233 233
 		private function hooks() {
234 234
 
235 235
 			// Register settings.
236
-			add_filter( 'give_settings_licenses', array( $this, 'settings' ), 1 );
236
+			add_filter('give_settings_licenses', array($this, 'settings'), 1);
237 237
 
238 238
 			// Activate license key on settings save.
239
-			add_action( 'admin_init', array( $this, 'activate_license' ), 10 );
239
+			add_action('admin_init', array($this, 'activate_license'), 10);
240 240
 
241 241
 			// Deactivate license key.
242
-			add_action( 'admin_init', array( $this, 'deactivate_license' ), 11 );
242
+			add_action('admin_init', array($this, 'deactivate_license'), 11);
243 243
 
244 244
 			// Updater.
245
-			add_action( 'admin_init', array( $this, 'auto_updater' ), 0 );
246
-			add_action( 'admin_notices', array( $this, 'notices' ) );
245
+			add_action('admin_init', array($this, 'auto_updater'), 0);
246
+			add_action('admin_notices', array($this, 'notices'));
247 247
 
248 248
 			// Check license weekly.
249
-			Give_Cron::add_weekly_event( array( $this, 'weekly_license_check' ) );
249
+			Give_Cron::add_weekly_event(array($this, 'weekly_license_check'));
250 250
 
251 251
 			// Check subscription weekly.
252
-			Give_Cron::add_weekly_event( array( $this, 'weekly_subscription_check' ) );
252
+			Give_Cron::add_weekly_event(array($this, 'weekly_subscription_check'));
253 253
 
254 254
 			// Show addon notice on plugin page.
255
-			$plugin_name = explode( 'plugins/', $this->file );
256
-			$plugin_name = end( $plugin_name );
257
-			add_action( "after_plugin_row_{$plugin_name}", array( $this, 'plugin_page_notices' ), 10, 3 );
255
+			$plugin_name = explode('plugins/', $this->file);
256
+			$plugin_name = end($plugin_name);
257
+			add_action("after_plugin_row_{$plugin_name}", array($this, 'plugin_page_notices'), 10, 3);
258 258
 
259 259
 		}
260 260
 
@@ -294,16 +294,16 @@  discard block
 block discarded – undo
294 294
 		 *
295 295
 		 * @return array           License settings.
296 296
 		 */
297
-		public function settings( $settings ) {
297
+		public function settings($settings) {
298 298
 
299 299
 			$give_license_settings = array(
300 300
 				array(
301 301
 					'name'    => $this->item_name,
302
-					'id'      => $this->item_shortname . '_license_key',
302
+					'id'      => $this->item_shortname.'_license_key',
303 303
 					'desc'    => '',
304 304
 					'type'    => 'license_key',
305 305
 					'options' => array(
306
-						'license'      => get_option( $this->item_shortname . '_license_active' ),
306
+						'license'      => get_option($this->item_shortname.'_license_active'),
307 307
 						'shortname'    => $this->item_shortname,
308 308
 						'item_name'    => $this->item_name,
309 309
 						'api_url'      => $this->api_url,
@@ -314,7 +314,7 @@  discard block
 block discarded – undo
314 314
 				),
315 315
 			);
316 316
 
317
-			return array_merge( $settings, $give_license_settings );
317
+			return array_merge($settings, $give_license_settings);
318 318
 		}
319 319
 
320 320
 		/**
@@ -329,18 +329,18 @@  discard block
 block discarded – undo
329 329
 		 *
330 330
 		 * @return array           License settings content.
331 331
 		 */
332
-		public function license_settings_content( $settings ) {
332
+		public function license_settings_content($settings) {
333 333
 
334 334
 			$give_license_settings = array(
335 335
 				array(
336
-					'name' => __( 'Add-on Licenses', 'give' ),
336
+					'name' => __('Add-on Licenses', 'give'),
337 337
 					'desc' => '<hr>',
338 338
 					'type' => 'give_title',
339 339
 					'id'   => 'give_title',
340 340
 				),
341 341
 			);
342 342
 
343
-			return array_merge( $settings, $give_license_settings );
343
+			return array_merge($settings, $give_license_settings);
344 344
 		}
345 345
 
346 346
 		/**
@@ -355,62 +355,62 @@  discard block
 block discarded – undo
355 355
 		 */
356 356
 		public function activate_license() {
357 357
 			// Bailout.
358
-			if ( ! $this->__is_user_can_edit_license() ) {
358
+			if ( ! $this->__is_user_can_edit_license()) {
359 359
 				return;
360 360
 			}
361 361
 
362 362
 			// Allow third party addon developers to handle license activation.
363
-			if ( $this->__is_third_party_addon() ) {
364
-				do_action( 'give_activate_license', $this );
363
+			if ($this->__is_third_party_addon()) {
364
+				do_action('give_activate_license', $this);
365 365
 
366 366
 				return;
367 367
 			}
368 368
 
369 369
 			// Delete previous license setting if a empty license key submitted.
370
-			if ( empty( $_POST["{$this->item_shortname}_license_key"] ) ) {
370
+			if (empty($_POST["{$this->item_shortname}_license_key"])) {
371 371
 				$this->unset_license();
372 372
 
373 373
 				return;
374 374
 			}
375 375
 
376 376
 			// Do not simultaneously activate add-ons if the user want to deactivate a specific add-on.
377
-			if( $this->is_deactivating_license() ) {
377
+			if ($this->is_deactivating_license()) {
378 378
 				return;
379 379
 			}
380 380
 
381 381
 			// Check if plugin previously installed.
382
-			if ( $this->is_valid_license() ) {
382
+			if ($this->is_valid_license()) {
383 383
 				return;
384 384
 			}
385 385
 
386 386
 			// Get license key.
387
-			$this->license = sanitize_text_field( $_POST[ $this->item_shortname . '_license_key' ] );
387
+			$this->license = sanitize_text_field($_POST[$this->item_shortname.'_license_key']);
388 388
 
389 389
 			// Delete previous license key from subscription if previously added.
390 390
 			$this->__remove_license_key_from_subscriptions();
391 391
 
392 392
 			// Make sure there are no api errors.
393
-			if ( ! ( $license_data = $this->get_license_info( 'activate_license' ) ) ) {
393
+			if ( ! ($license_data = $this->get_license_info('activate_license'))) {
394 394
 				return;
395 395
 			}
396 396
 
397 397
 			// Make sure license is valid.
398 398
 			// return because admin will want to activate license again.
399
-			if ( ! $this->is_license( $license_data ) ) {
399
+			if ( ! $this->is_license($license_data)) {
400 400
 				// Add license key.
401
-				give_update_option( "{$this->item_shortname}_license_key", $this->license );
401
+				give_update_option("{$this->item_shortname}_license_key", $this->license);
402 402
 
403 403
 				return;
404 404
 			}
405 405
 
406 406
 			// Tell WordPress to look for updates.
407
-			set_site_transient( 'update_plugins', null );
407
+			set_site_transient('update_plugins', null);
408 408
 
409 409
 			// Add license data.
410
-			update_option( "{$this->item_shortname}_license_active", $license_data, false );
410
+			update_option("{$this->item_shortname}_license_active", $license_data, false);
411 411
 
412 412
 			// Add license key.
413
-			give_update_option( "{$this->item_shortname}_license_key", $this->license );
413
+			give_update_option("{$this->item_shortname}_license_key", $this->license);
414 414
 
415 415
 			// Check subscription for license key and store this to db (if any).
416 416
 			$this->__single_subscription_check();
@@ -428,19 +428,19 @@  discard block
 block discarded – undo
428 428
 		 */
429 429
 		public function deactivate_license() {
430 430
 			// Bailout.
431
-			if ( ! $this->__is_user_can_edit_license() ) {
431
+			if ( ! $this->__is_user_can_edit_license()) {
432 432
 				return;
433 433
 			}
434 434
 
435 435
 			// Allow third party add-on developers to handle license deactivation.
436
-			if ( $this->__is_third_party_addon() ) {
437
-				do_action( 'give_deactivate_license', $this );
436
+			if ($this->__is_third_party_addon()) {
437
+				do_action('give_deactivate_license', $this);
438 438
 
439 439
 				return;
440 440
 			}
441 441
 
442 442
 			// Run on deactivate button press.
443
-			if ( isset( $_POST[ $this->item_shortname . '_license_key_deactivate' ] ) ) {
443
+			if (isset($_POST[$this->item_shortname.'_license_key_deactivate'])) {
444 444
 				$this->unset_license();
445 445
 			}
446 446
 		}
@@ -456,30 +456,30 @@  discard block
 block discarded – undo
456 456
 		public function weekly_license_check() {
457 457
 
458 458
 			if (
459
-				! empty( $_POST['give_settings'] ) ||
460
-				empty( $this->license )
459
+				! empty($_POST['give_settings']) ||
460
+				empty($this->license)
461 461
 			) {
462 462
 				return;
463 463
 			}
464 464
 
465 465
 			// Allow third party add-on developers to handle their license check.
466
-			if ( $this->__is_third_party_addon() ) {
467
-				do_action( 'give_weekly_license_check', $this );
466
+			if ($this->__is_third_party_addon()) {
467
+				do_action('give_weekly_license_check', $this);
468 468
 
469 469
 				return;
470 470
 			}
471 471
 
472 472
 			// Make sure there are no api errors.
473
-			if ( ! ( $license_data = $this->get_license_info( 'check_license' ) ) ) {
473
+			if ( ! ($license_data = $this->get_license_info('check_license'))) {
474 474
 				return;
475 475
 			}
476 476
 
477 477
 			// Bailout.
478
-			if ( ! $this->is_license( $license_data ) ) {
478
+			if ( ! $this->is_license($license_data)) {
479 479
 				return;
480 480
 			}
481 481
 
482
-			update_option( $this->item_shortname . '_license_active', $license_data, false );
482
+			update_option($this->item_shortname.'_license_active', $license_data, false);
483 483
 
484 484
 			return;
485 485
 		}
@@ -495,21 +495,21 @@  discard block
 block discarded – undo
495 495
 		public function weekly_subscription_check() {
496 496
 			// Bailout.
497 497
 			if (
498
-				! empty( $_POST['give_settings'] ) ||
499
-				empty( $this->license )
498
+				! empty($_POST['give_settings']) ||
499
+				empty($this->license)
500 500
 			) {
501 501
 				return;
502 502
 			}
503 503
 
504 504
 			// Remove old subscription data.
505
-			if ( absint( get_option( '_give_subscriptions_edit_last', true ) ) < current_time( 'timestamp', 1 ) ) {
506
-				delete_option( 'give_subscriptions' );
507
-				update_option( '_give_subscriptions_edit_last', strtotime( '+ 1 day', current_time( 'timestamp', 1 ) ), false );
505
+			if (absint(get_option('_give_subscriptions_edit_last', true)) < current_time('timestamp', 1)) {
506
+				delete_option('give_subscriptions');
507
+				update_option('_give_subscriptions_edit_last', strtotime('+ 1 day', current_time('timestamp', 1)), false);
508 508
 			}
509 509
 
510 510
 			// Allow third party add-on developers to handle their subscription check.
511
-			if ( $this->__is_third_party_addon() ) {
512
-				do_action( 'give_weekly_subscription_check', $this );
511
+			if ($this->__is_third_party_addon()) {
512
+				do_action('give_weekly_subscription_check', $this);
513 513
 
514 514
 				return;
515 515
 			}
@@ -526,7 +526,7 @@  discard block
 block discarded – undo
526 526
 		 * @return void
527 527
 		 */
528 528
 		private function __single_subscription_check() {
529
-			if ( empty( $this->license ) ) {
529
+			if (empty($this->license)) {
530 530
 				return;
531 531
 			}
532 532
 
@@ -537,26 +537,26 @@  discard block
 block discarded – undo
537 537
 			 * By default edd software licensing api does not have api to check subscription.
538 538
 			 * This is a custom feature to check subscriptions.
539 539
 			 */
540
-			$subscription_data = $this->get_license_info( 'check_subscription', true );
540
+			$subscription_data = $this->get_license_info('check_subscription', true);
541 541
 
542
-			if ( ! empty( $subscription_data['success'] ) && absint( $subscription_data['success'] ) ) {
542
+			if ( ! empty($subscription_data['success']) && absint($subscription_data['success'])) {
543 543
 
544
-				$subscriptions = get_option( 'give_subscriptions', array() );
544
+				$subscriptions = get_option('give_subscriptions', array());
545 545
 
546 546
 				// Update subscription data only if subscription does not exist already.
547
-				$subscriptions[ $subscription_data['id'] ] = $subscription_data;
547
+				$subscriptions[$subscription_data['id']] = $subscription_data;
548 548
 
549 549
 				// Initiate default set of license for subscription.
550
-				if ( ! isset( $subscriptions[ $subscription_data['id'] ]['licenses'] ) ) {
551
-					$subscriptions[ $subscription_data['id'] ]['licenses'] = array();
550
+				if ( ! isset($subscriptions[$subscription_data['id']]['licenses'])) {
551
+					$subscriptions[$subscription_data['id']]['licenses'] = array();
552 552
 				}
553 553
 
554 554
 				// Store licenses for subscription.
555
-				if ( ! in_array( $this->license, $subscriptions[ $subscription_data['id'] ]['licenses'] ) ) {
556
-					$subscriptions[ $subscription_data['id'] ]['licenses'][] = $this->license;
555
+				if ( ! in_array($this->license, $subscriptions[$subscription_data['id']]['licenses'])) {
556
+					$subscriptions[$subscription_data['id']]['licenses'][] = $this->license;
557 557
 				}
558 558
 
559
-				update_option( 'give_subscriptions', $subscriptions, false );
559
+				update_option('give_subscriptions', $subscriptions, false);
560 560
 			}
561 561
 		}
562 562
 
@@ -570,12 +570,12 @@  discard block
 block discarded – undo
570 570
 		 */
571 571
 		public function notices() {
572 572
 
573
-			if ( ! current_user_can( 'manage_give_settings' ) ) {
573
+			if ( ! current_user_can('manage_give_settings')) {
574 574
 				return;
575 575
 			}
576 576
 
577 577
 			// Do not show licenses notices on license tab.
578
-			if ( 'licenses' === give_get_current_setting_tab() ) {
578
+			if ('licenses' === give_get_current_setting_tab()) {
579 579
 				return;
580 580
 			}
581 581
 
@@ -584,118 +584,118 @@  discard block
 block discarded – undo
584 584
 			static $addon_license_key_in_subscriptions;
585 585
 
586 586
 			// Set default value.
587
-			$addon_license_key_in_subscriptions = ! empty( $addon_license_key_in_subscriptions ) ? $addon_license_key_in_subscriptions : array();
587
+			$addon_license_key_in_subscriptions = ! empty($addon_license_key_in_subscriptions) ? $addon_license_key_in_subscriptions : array();
588 588
 			$messages                           = array();
589 589
 
590 590
 			// Check whether admin has Give Add-on activated since 24 hours?
591
-			$is_license_notice_hidden = Give_Cache::get( 'give_cache_hide_license_notice_after_activation' );
591
+			$is_license_notice_hidden = Give_Cache::get('give_cache_hide_license_notice_after_activation');
592 592
 
593 593
 			// Display Invalid License notice, if its more than 24 hours since first Give Add-on activation.
594 594
 			if (
595
-				empty( $this->license )
596
-				&& empty( $showed_invalid_message )
597
-				&& ( false === $is_license_notice_hidden )
595
+				empty($this->license)
596
+				&& empty($showed_invalid_message)
597
+				&& (false === $is_license_notice_hidden)
598 598
 			) {
599 599
 
600
-				Give()->notices->register_notice( array(
600
+				Give()->notices->register_notice(array(
601 601
 					'id'               => 'give-invalid-license',
602 602
 					'type'             => 'error',
603 603
 					'description'      => sprintf(
604
-						__( 'You have invalid or expired license keys for one or more Give Add-ons. Please go to the <a href="%s">licenses page</a> to correct this issue.', 'give' ),
605
-						admin_url( 'edit.php?post_type=give_forms&page=give-settings&tab=licenses' )
604
+						__('You have invalid or expired license keys for one or more Give Add-ons. Please go to the <a href="%s">licenses page</a> to correct this issue.', 'give'),
605
+						admin_url('edit.php?post_type=give_forms&page=give-settings&tab=licenses')
606 606
 					),
607 607
 					'dismissible_type' => 'user',
608 608
 					'dismiss_interval' => 'shortly',
609
-				) );
609
+				));
610 610
 
611 611
 				$showed_invalid_message = true;
612 612
 
613 613
 			}
614 614
 
615 615
 			// Get subscriptions.
616
-			$subscriptions = get_option( 'give_subscriptions' );
616
+			$subscriptions = get_option('give_subscriptions');
617 617
 
618 618
 			// Show subscription messages.
619
-			if ( ! empty( $subscriptions ) && ! $showed_subscriptions_message ) {
619
+			if ( ! empty($subscriptions) && ! $showed_subscriptions_message) {
620 620
 
621
-				foreach ( $subscriptions as $subscription ) {
621
+				foreach ($subscriptions as $subscription) {
622 622
 					// Subscription expires timestamp.
623
-					$subscription_expires = strtotime( $subscription['expires'] );
623
+					$subscription_expires = strtotime($subscription['expires']);
624 624
 
625 625
 					// Start showing subscriptions message before one week of renewal date.
626
-					if ( strtotime( '- 7 days', $subscription_expires ) > current_time( 'timestamp', 1 ) ) {
626
+					if (strtotime('- 7 days', $subscription_expires) > current_time('timestamp', 1)) {
627 627
 						continue;
628 628
 					}
629 629
 
630 630
 					// Check if subscription message already exist in messages.
631
-					if ( array_key_exists( $subscription['id'], $messages ) ) {
631
+					if (array_key_exists($subscription['id'], $messages)) {
632 632
 						continue;
633 633
 					}
634 634
 
635 635
 					// Check if license already expired.
636
-					if ( strtotime( $subscription['expires'] ) < current_time( 'timestamp', 1 ) ) {
637
-						Give()->notices->register_notice( array(
636
+					if (strtotime($subscription['expires']) < current_time('timestamp', 1)) {
637
+						Give()->notices->register_notice(array(
638 638
 							'id'               => "give-expired-subscription-{$subscription['id']}",
639 639
 							'type'             => 'error',
640 640
 							'description'      => sprintf(
641
-								__( 'Your Give add-on license expired for payment <a href="%1$s" target="_blank">#%2$d</a>. <a href="%3$s" target="_blank">Click to renew an existing license</a> or %4$s.', 'give' ),
642
-								urldecode( $subscription['invoice_url'] ),
641
+								__('Your Give add-on license expired for payment <a href="%1$s" target="_blank">#%2$d</a>. <a href="%3$s" target="_blank">Click to renew an existing license</a> or %4$s.', 'give'),
642
+								urldecode($subscription['invoice_url']),
643 643
 								$subscription['payment_id'],
644 644
 								"{$this->checkout_url}?edd_license_key={$subscription['license_key']}&utm_campaign=admin&utm_source=licenses&utm_medium=expired",
645
-								Give()->notices->get_dismiss_link( array(
646
-									'title'            => __( 'Click here if already renewed', 'give' ),
645
+								Give()->notices->get_dismiss_link(array(
646
+									'title'            => __('Click here if already renewed', 'give'),
647 647
 									'dismissible_type' => 'user',
648 648
 									'dismiss_interval' => 'permanent',
649
-								) )
649
+								))
650 650
 							),
651 651
 							'dismissible_type' => 'user',
652 652
 							'dismiss_interval' => 'shortly',
653
-						) );
653
+						));
654 654
 					} else {
655
-						Give()->notices->register_notice( array(
655
+						Give()->notices->register_notice(array(
656 656
 							'id'               => "give-expires-subscription-{$subscription['id']}",
657 657
 							'type'             => 'error',
658 658
 							'description'      => sprintf(
659
-								__( 'Your Give add-on license will expire in %1$s for payment <a href="%2$s" target="_blank">#%3$d</a>. <a href="%4$s" target="_blank">Click to renew an existing license</a> or %5$s.', 'give' ),
660
-								human_time_diff( current_time( 'timestamp', 1 ), strtotime( $subscription['expires'] ) ),
661
-								urldecode( $subscription['invoice_url'] ),
659
+								__('Your Give add-on license will expire in %1$s for payment <a href="%2$s" target="_blank">#%3$d</a>. <a href="%4$s" target="_blank">Click to renew an existing license</a> or %5$s.', 'give'),
660
+								human_time_diff(current_time('timestamp', 1), strtotime($subscription['expires'])),
661
+								urldecode($subscription['invoice_url']),
662 662
 								$subscription['payment_id'],
663 663
 								"{$this->checkout_url}?edd_license_key={$subscription['license_key']}&utm_campaign=admin&utm_source=licenses&utm_medium=expired",
664
-								Give()->notices->get_dismiss_link( array(
665
-									'title'            => __( 'Click here if already renewed', 'give' ),
664
+								Give()->notices->get_dismiss_link(array(
665
+									'title'            => __('Click here if already renewed', 'give'),
666 666
 									'dismissible_type' => 'user',
667 667
 									'dismiss_interval' => 'permanent',
668
-								) )
668
+								))
669 669
 							),
670 670
 							'dismissible_type' => 'user',
671 671
 							'dismiss_interval' => 'shortly',
672
-						) );
672
+						));
673 673
 					}
674 674
 
675 675
 					// Stop validation for these license keys.
676
-					$addon_license_key_in_subscriptions = array_merge( $addon_license_key_in_subscriptions, $subscription['licenses'] );
676
+					$addon_license_key_in_subscriptions = array_merge($addon_license_key_in_subscriptions, $subscription['licenses']);
677 677
 				}// End foreach().
678 678
 				$showed_subscriptions_message = true;
679 679
 			}// End if().
680 680
 
681 681
 			// Show Non Subscription Give Add-on messages.
682 682
 			if (
683
-				! in_array( $this->license, $addon_license_key_in_subscriptions )
684
-				&& ! empty( $this->license )
685
-				&& empty( $showed_invalid_message )
683
+				! in_array($this->license, $addon_license_key_in_subscriptions)
684
+				&& ! empty($this->license)
685
+				&& empty($showed_invalid_message)
686 686
 				&& ! $this->is_valid_license()
687 687
 			) {
688 688
 
689
-				Give()->notices->register_notice( array(
689
+				Give()->notices->register_notice(array(
690 690
 					'id'               => 'give-invalid-license',
691 691
 					'type'             => 'error',
692 692
 					'description'      => sprintf(
693
-						__( 'You have invalid or expired license keys for one or more Give Add-ons. Please go to the <a href="%s">licenses page</a> to correct this issue.', 'give' ),
694
-						admin_url( 'edit.php?post_type=give_forms&page=give-settings&tab=licenses' )
693
+						__('You have invalid or expired license keys for one or more Give Add-ons. Please go to the <a href="%s">licenses page</a> to correct this issue.', 'give'),
694
+						admin_url('edit.php?post_type=give_forms&page=give-settings&tab=licenses')
695 695
 					),
696 696
 					'dismissible_type' => 'user',
697 697
 					'dismiss_interval' => 'shortly',
698
-				) );
698
+				));
699 699
 
700 700
 				$showed_invalid_message = true;
701 701
 
@@ -712,10 +712,10 @@  discard block
 block discarded – undo
712 712
 		 *
713 713
 		 * @return bool
714 714
 		 */
715
-		public function is_valid_license( $licence_data = null ) {
716
-			$license_data = empty( $licence_data ) ? $this->license_data : $licence_data;
715
+		public function is_valid_license($licence_data = null) {
716
+			$license_data = empty($licence_data) ? $this->license_data : $licence_data;
717 717
 
718
-			if ( apply_filters( 'give_is_valid_license', ( $this->is_license( $license_data ) && 'valid' === $license_data->license ) ) ) {
718
+			if (apply_filters('give_is_valid_license', ($this->is_license($license_data) && 'valid' === $license_data->license))) {
719 719
 				return true;
720 720
 			}
721 721
 
@@ -733,10 +733,10 @@  discard block
 block discarded – undo
733 733
 		 *
734 734
 		 * @return bool
735 735
 		 */
736
-		public function is_license( $licence_data = null ) {
737
-			$license_data = empty( $licence_data ) ? $this->license_data : $licence_data;
736
+		public function is_license($licence_data = null) {
737
+			$license_data = empty($licence_data) ? $this->license_data : $licence_data;
738 738
 
739
-			if ( apply_filters( 'give_is_license', ( is_object( $license_data ) && ! empty( $license_data ) && property_exists( $license_data, 'license' ) ) ) ) {
739
+			if (apply_filters('give_is_license', (is_object($license_data) && ! empty($license_data) && property_exists($license_data, 'license')))) {
740 740
 				return true;
741 741
 			}
742 742
 
@@ -752,7 +752,7 @@  discard block
 block discarded – undo
752 752
 		 * @return bool
753 753
 		 */
754 754
 		private function __is_third_party_addon() {
755
-			return ( false === strpos( $this->api_url, 'givewp.com/' ) );
755
+			return (false === strpos($this->api_url, 'givewp.com/'));
756 756
 		}
757 757
 
758 758
 		/**
@@ -767,25 +767,25 @@  discard block
 block discarded – undo
767 767
 		 * @return bool
768 768
 		 */
769 769
 		private function __remove_license_key_from_subscriptions() {
770
-			$subscriptions = get_option( 'give_subscriptions', array() );
770
+			$subscriptions = get_option('give_subscriptions', array());
771 771
 
772 772
 			// Bailout.
773
-			if ( empty( $this->license ) ) {
773
+			if (empty($this->license)) {
774 774
 				return false;
775 775
 			}
776 776
 
777
-			if ( ! empty( $subscriptions ) ) {
778
-				foreach ( $subscriptions as $subscription_id => $subscription ) {
779
-					$license_index = array_search( $this->license, $subscription['licenses'] );
780
-					if ( false !== $license_index ) {
777
+			if ( ! empty($subscriptions)) {
778
+				foreach ($subscriptions as $subscription_id => $subscription) {
779
+					$license_index = array_search($this->license, $subscription['licenses']);
780
+					if (false !== $license_index) {
781 781
 						// Remove license key.
782
-						unset( $subscriptions[ $subscription_id ]['licenses'][ $license_index ] );
782
+						unset($subscriptions[$subscription_id]['licenses'][$license_index]);
783 783
 
784 784
 						// Rearrange license keys.
785
-						$subscriptions[ $subscription_id ]['licenses'] = array_values( $subscriptions[ $subscription_id ]['licenses'] );
785
+						$subscriptions[$subscription_id]['licenses'] = array_values($subscriptions[$subscription_id]['licenses']);
786 786
 
787 787
 						// Update subscription information.
788
-						update_option( 'give_subscriptions', $subscriptions, false );
788
+						update_option('give_subscriptions', $subscriptions, false);
789 789
 						break;
790 790
 					}
791 791
 				}
@@ -799,17 +799,17 @@  discard block
 block discarded – undo
799 799
 		 *
800 800
 		 * @return bool
801 801
 		 */
802
-		public function plugin_page_notices( $plugin_file, $plugin_data, $status ) {
802
+		public function plugin_page_notices($plugin_file, $plugin_data, $status) {
803 803
 			// Bailout.
804
-			if ( $this->is_valid_license() ) {
804
+			if ($this->is_valid_license()) {
805 805
 				return false;
806 806
 			}
807 807
 
808 808
 			$update_notice_wrap = '<tr class="give-addon-notice-tr active"><td colspan="3" class="colspanchange"><div class="notice inline notice-warning notice-alt give-invalid-license"><p><span class="dashicons dashicons-info"></span> %s</p></div></td></tr>';
809 809
 			$message            = $this->license_state_message();
810 810
 
811
-			if ( ! empty( $message['message'] ) ) {
812
-				echo sprintf( $update_notice_wrap, $message['message'] );
811
+			if ( ! empty($message['message'])) {
812
+				echo sprintf($update_notice_wrap, $message['message']);
813 813
 			}
814 814
 		}
815 815
 
@@ -824,11 +824,11 @@  discard block
 block discarded – undo
824 824
 		public function license_state_message() {
825 825
 			$message_data = array();
826 826
 
827
-			if ( ! $this->is_valid_license() ) {
827
+			if ( ! $this->is_valid_license()) {
828 828
 
829 829
 				$message_data['message'] = sprintf(
830 830
 					'Please <a href="%1$s">activate your license</a> to receive updates and support for the %2$s add-on.',
831
-					esc_url( admin_url( 'edit.php?post_type=give_forms&page=give-settings&tab=licenses' ) ),
831
+					esc_url(admin_url('edit.php?post_type=give_forms&page=give-settings&tab=licenses')),
832 832
 					$this->item_name
833 833
 				);
834 834
 			}
@@ -847,7 +847,7 @@  discard block
 block discarded – undo
847 847
 			// Bailout.
848 848
 			if (
849 849
 				! Give_Admin_Settings::verify_nonce() ||
850
-				! current_user_can( 'manage_give_settings' ) ||
850
+				! current_user_can('manage_give_settings') ||
851 851
 				'licenses' !== give_get_current_setting_tab()
852 852
 			) {
853 853
 				return false;
@@ -855,10 +855,10 @@  discard block
 block discarded – undo
855 855
 
856 856
 			// Security check.
857 857
 			if (
858
-				isset( $_POST[ $this->item_shortname . '_license_key-nonce' ] ) &&
859
-				! wp_verify_nonce( $_REQUEST[ $this->item_shortname . '_license_key-nonce' ], $this->item_shortname . '_license_key-nonce' )
858
+				isset($_POST[$this->item_shortname.'_license_key-nonce']) &&
859
+				! wp_verify_nonce($_REQUEST[$this->item_shortname.'_license_key-nonce'], $this->item_shortname.'_license_key-nonce')
860 860
 			) {
861
-				wp_die( __( 'Nonce verification failed.', 'give' ), __( 'Error', 'give' ), array( 'response' => 403 ) );
861
+				wp_die(__('Nonce verification failed.', 'give'), __('Error', 'give'), array('response' => 403));
862 862
 			}
863 863
 
864 864
 			return true;
@@ -876,9 +876,9 @@  discard block
 block discarded – undo
876 876
 		 *
877 877
 		 * @return mixed
878 878
 		 */
879
-		public function get_license_info( $edd_action = '', $response_in_array = false ) {
879
+		public function get_license_info($edd_action = '', $response_in_array = false) {
880 880
 
881
-			if ( empty( $edd_action ) ) {
881
+			if (empty($edd_action)) {
882 882
 				return false;
883 883
 			}
884 884
 
@@ -886,7 +886,7 @@  discard block
 block discarded – undo
886 886
 			$api_params = array(
887 887
 				'edd_action' => $edd_action, // never change from "edd_" to "give_"!
888 888
 				'license'    => $this->license,
889
-				'item_name'  => urlencode( $this->item_name ),
889
+				'item_name'  => urlencode($this->item_name),
890 890
 				'url'        => home_url(),
891 891
 			);
892 892
 
@@ -901,11 +901,11 @@  discard block
 block discarded – undo
901 901
 			);
902 902
 
903 903
 			// Make sure there are no errors.
904
-			if ( is_wp_error( $response ) ) {
904
+			if (is_wp_error($response)) {
905 905
 				return false;
906 906
 			}
907 907
 
908
-			return json_decode( wp_remote_retrieve_body( $response ), $response_in_array );
908
+			return json_decode(wp_remote_retrieve_body($response), $response_in_array);
909 909
 		}
910 910
 
911 911
 
@@ -921,9 +921,9 @@  discard block
 block discarded – undo
921 921
 			$this->__remove_license_key_from_subscriptions();
922 922
 
923 923
 			// Remove license from database.
924
-			delete_option( "{$this->item_shortname}_license_active" );
925
-			give_delete_option( "{$this->item_shortname}_license_key" );
926
-			unset( $_POST["{$this->item_shortname}_license_key"] );
924
+			delete_option("{$this->item_shortname}_license_active");
925
+			give_delete_option("{$this->item_shortname}_license_key");
926
+			unset($_POST["{$this->item_shortname}_license_key"]);
927 927
 
928 928
 			// Unset license param.
929 929
 			$this->license = '';
@@ -941,8 +941,8 @@  discard block
 block discarded – undo
941 941
 		private function is_deactivating_license() {
942 942
 			$status = false;
943 943
 
944
-			foreach ( $_POST as $key => $value ) {
945
-				if ( false !== strpos( $key, 'license_key_deactivate' ) ) {
944
+			foreach ($_POST as $key => $value) {
945
+				if (false !== strpos($key, 'license_key_deactivate')) {
946 946
 					$status = true;
947 947
 					break;
948 948
 				}
Please login to merge, or discard this patch.
includes/currency-functions.php 1 patch
Spacing   +223 added lines, -223 removed lines patch added patch discarded remove patch
@@ -20,17 +20,17 @@  discard block
 block discarded – undo
20 20
  *
21 21
  * @return string The currency code
22 22
  */
23
-function give_get_currency( $donation_or_form_id = null, $args = array() ) {
23
+function give_get_currency($donation_or_form_id = null, $args = array()) {
24 24
 
25 25
 	// Get currency from donation
26
-	if ( is_numeric( $donation_or_form_id ) && 'give_payment' === get_post_type( $donation_or_form_id ) ) {
27
-		$currency = give_get_meta( $donation_or_form_id, '_give_payment_currency', true );
26
+	if (is_numeric($donation_or_form_id) && 'give_payment' === get_post_type($donation_or_form_id)) {
27
+		$currency = give_get_meta($donation_or_form_id, '_give_payment_currency', true);
28 28
 
29
-		if ( empty( $currency ) ) {
30
-			$currency = give_get_option( 'currency', 'USD' );
29
+		if (empty($currency)) {
30
+			$currency = give_get_option('currency', 'USD');
31 31
 		}
32 32
 	} else {
33
-		$currency = give_get_option( 'currency', 'USD' );
33
+		$currency = give_get_option('currency', 'USD');
34 34
 	}
35 35
 
36 36
 	/**
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
 	 *
39 39
 	 * @since 1.0
40 40
 	 */
41
-	return apply_filters( 'give_currency', $currency, $donation_or_form_id, $args );
41
+	return apply_filters('give_currency', $currency, $donation_or_form_id, $args);
42 42
 }
43 43
 
44 44
 /**
@@ -50,9 +50,9 @@  discard block
 block discarded – undo
50 50
  */
51 51
 function give_get_currency_position() {
52 52
 
53
-	$currency_pos = give_get_option( 'currency_position', 'before' );
53
+	$currency_pos = give_get_option('currency_position', 'before');
54 54
 
55
-	return apply_filters( 'give_currency_position', $currency_pos );
55
+	return apply_filters('give_currency_position', $currency_pos);
56 56
 }
57 57
 
58 58
 /**
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 function give_get_currencies_list() {
66 66
 	$currencies = array(
67 67
 		'USD' => array(
68
-			'admin_label' => sprintf( __('US Dollars (%1$s)', 'give'), '&#36;'),
68
+			'admin_label' => sprintf(__('US Dollars (%1$s)', 'give'), '&#36;'),
69 69
 			'symbol'      => '&#36;',
70 70
 			'setting'     => array(
71 71
 				'currency_position'   => 'before',
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
 			),
76 76
 		),
77 77
 		'EUR' => array(
78
-			'admin_label' => sprintf( __('Euros (%1$s)', 'give'), '&euro;'),
78
+			'admin_label' => sprintf(__('Euros (%1$s)', 'give'), '&euro;'),
79 79
 			'symbol'      => '&euro;',
80 80
 			'setting'     => array(
81 81
 				'currency_position'   => 'before',
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
 			),
86 86
 		),
87 87
 		'GBP' => array(
88
-			'admin_label' => sprintf( __('Pounds Sterling (%1$s)', 'give'), '&pound;'),
88
+			'admin_label' => sprintf(__('Pounds Sterling (%1$s)', 'give'), '&pound;'),
89 89
 			'symbol'      => '&pound;',
90 90
 			'setting'     => array(
91 91
 				'currency_position'   => 'before',
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
 			),
96 96
 		),
97 97
 		'AUD' => array(
98
-			'admin_label' => sprintf( __('Australian Dollars (%1$s)', 'give'), '&#36;'),
98
+			'admin_label' => sprintf(__('Australian Dollars (%1$s)', 'give'), '&#36;'),
99 99
 			'symbol'      => '&#36;',
100 100
 			'setting'     => array(
101 101
 				'currency_position'   => 'before',
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
 			),
106 106
 		),
107 107
 		'BRL' => array(
108
-			'admin_label' => sprintf( __('Brazilian Real (%1$s)', 'give'), '&#82;&#36;'),
108
+			'admin_label' => sprintf(__('Brazilian Real (%1$s)', 'give'), '&#82;&#36;'),
109 109
 			'symbol'      => '&#82;&#36;',
110 110
 			'setting'     => array(
111 111
 				'currency_position'   => 'before',
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
 			),
116 116
 		),
117 117
 		'CAD' => array(
118
-			'admin_label' => sprintf( __('Canadian Dollars (%1$s)', 'give'), '&#36;'),
118
+			'admin_label' => sprintf(__('Canadian Dollars (%1$s)', 'give'), '&#36;'),
119 119
 			'symbol'      => '&#36;',
120 120
 			'setting'     => array(
121 121
 				'currency_position'   => 'before',
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
 			),
126 126
 		),
127 127
 		'CZK' => array(
128
-			'admin_label' => sprintf( __('Czech Koruna (%1$s)', 'give'), '&#75;&#269;'),
128
+			'admin_label' => sprintf(__('Czech Koruna (%1$s)', 'give'), '&#75;&#269;'),
129 129
 			'symbol'      => '&#75;&#269;',
130 130
 			'setting'     => array(
131 131
 				'currency_position'   => 'after',
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
 			),
136 136
 		),
137 137
 		'DKK' => array(
138
-			'admin_label' => sprintf( __('Danish Krone (%1$s)', 'give'), '&nbsp;kr.&nbsp;'),
138
+			'admin_label' => sprintf(__('Danish Krone (%1$s)', 'give'), '&nbsp;kr.&nbsp;'),
139 139
 			'symbol'      => '&nbsp;kr.&nbsp;',
140 140
 			'setting'     => array(
141 141
 				'currency_position'   => 'before',
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
 			),
146 146
 		),
147 147
 		'HKD' => array(
148
-			'admin_label' => sprintf( __('Hong Kong Dollar (%1$s)', 'give'), '&#36;'),
148
+			'admin_label' => sprintf(__('Hong Kong Dollar (%1$s)', 'give'), '&#36;'),
149 149
 			'symbol'      => '&#36;',
150 150
 			'setting'     => array(
151 151
 				'currency_position'   => 'before',
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
 			),
156 156
 		),
157 157
 		'HUF' => array(
158
-			'admin_label' => sprintf( __('Hungarian Forint (%1$s)', 'give'), '&#70;&#116;'),
158
+			'admin_label' => sprintf(__('Hungarian Forint (%1$s)', 'give'), '&#70;&#116;'),
159 159
 			'symbol'      => '&#70;&#116;',
160 160
 			'setting'     => array(
161 161
 				'currency_position'   => 'after',
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
 			),
166 166
 		),
167 167
 		'ILS' => array(
168
-			'admin_label' => sprintf( __('Israeli Shekel (%1$s)', 'give'), '&#8362;'),
168
+			'admin_label' => sprintf(__('Israeli Shekel (%1$s)', 'give'), '&#8362;'),
169 169
 			'symbol'      => '&#8362;',
170 170
 			'setting'     => array(
171 171
 				'currency_position'   => 'after',
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
 			),
176 176
 		),
177 177
 		'JPY' => array(
178
-			'admin_label' => sprintf( __('Japanese Yen (%1$s)', 'give'), '&yen;'),
178
+			'admin_label' => sprintf(__('Japanese Yen (%1$s)', 'give'), '&yen;'),
179 179
 			'symbol'      => '&yen;',
180 180
 			'setting'     => array(
181 181
 				'currency_position'   => 'before',
@@ -185,7 +185,7 @@  discard block
 block discarded – undo
185 185
 			),
186 186
 		),
187 187
 		'MYR' => array(
188
-			'admin_label' => sprintf( __('Malaysian Ringgits (%1$s)', 'give'), '&#82;&#77;'),
188
+			'admin_label' => sprintf(__('Malaysian Ringgits (%1$s)', 'give'), '&#82;&#77;'),
189 189
 			'symbol'      => '&#82;&#77;',
190 190
 			'setting'     => array(
191 191
 				'currency_position'   => 'before',
@@ -195,7 +195,7 @@  discard block
 block discarded – undo
195 195
 			),
196 196
 		),
197 197
 		'MXN' => array(
198
-			'admin_label' => sprintf( __('Mexican Peso (%1$s)', 'give'), '&#36;'),
198
+			'admin_label' => sprintf(__('Mexican Peso (%1$s)', 'give'), '&#36;'),
199 199
 			'symbol'      => '&#36;',
200 200
 			'setting'     => array(
201 201
 				'currency_position'   => 'before',
@@ -205,7 +205,7 @@  discard block
 block discarded – undo
205 205
 			),
206 206
 		),
207 207
 		'MAD' => array(
208
-			'admin_label' => sprintf( __('Moroccan Dirham (%1$s)', 'give'), '&#x2e;&#x62f;&#x2e;&#x645;'),
208
+			'admin_label' => sprintf(__('Moroccan Dirham (%1$s)', 'give'), '&#x2e;&#x62f;&#x2e;&#x645;'),
209 209
 			'symbol'      => '&#x2e;&#x62f;&#x2e;&#x645;',
210 210
 			'setting'     => array(
211 211
 				'currency_position'   => 'before',
@@ -215,7 +215,7 @@  discard block
 block discarded – undo
215 215
 			),
216 216
 		),
217 217
 		'NZD' => array(
218
-			'admin_label' => sprintf( __('New Zealand Dollar (%1$s)', 'give'), '&#36;'),
218
+			'admin_label' => sprintf(__('New Zealand Dollar (%1$s)', 'give'), '&#36;'),
219 219
 			'symbol'      => '&#36;',
220 220
 			'setting'     => array(
221 221
 				'currency_position'   => 'before',
@@ -225,7 +225,7 @@  discard block
 block discarded – undo
225 225
 			),
226 226
 		),
227 227
 		'NOK' => array(
228
-			'admin_label' => sprintf( __('Norwegian Krone (%1$s)', 'give'), '&#107;&#114;.'),
228
+			'admin_label' => sprintf(__('Norwegian Krone (%1$s)', 'give'), '&#107;&#114;.'),
229 229
 			'symbol'      => '&#107;&#114;.',
230 230
 			'setting'     => array(
231 231
 				'currency_position'   => 'before',
@@ -235,7 +235,7 @@  discard block
 block discarded – undo
235 235
 			),
236 236
 		),
237 237
 		'PHP' => array(
238
-			'admin_label' => sprintf( __('Philippine Pesos (%1$s)', 'give'), '&#8369;'),
238
+			'admin_label' => sprintf(__('Philippine Pesos (%1$s)', 'give'), '&#8369;'),
239 239
 			'symbol'      => '&#8369;',
240 240
 			'setting'     => array(
241 241
 				'currency_position'   => 'before',
@@ -245,7 +245,7 @@  discard block
 block discarded – undo
245 245
 			),
246 246
 		),
247 247
 		'PLN' => array(
248
-			'admin_label' => sprintf( __('Polish Zloty (%1$s)', 'give'), '&#122;&#322;'),
248
+			'admin_label' => sprintf(__('Polish Zloty (%1$s)', 'give'), '&#122;&#322;'),
249 249
 			'symbol'      => '&#122;&#322;',
250 250
 			'setting'     => array(
251 251
 				'currency_position'   => 'after',
@@ -255,7 +255,7 @@  discard block
 block discarded – undo
255 255
 			),
256 256
 		),
257 257
 		'SGD' => array(
258
-			'admin_label' => sprintf( __('Singapore Dollar (%1$s)', 'give'), '&#36;'),
258
+			'admin_label' => sprintf(__('Singapore Dollar (%1$s)', 'give'), '&#36;'),
259 259
 			'symbol'      => '&#36;',
260 260
 			'setting'     => array(
261 261
 				'currency_position'   => 'before',
@@ -265,7 +265,7 @@  discard block
 block discarded – undo
265 265
 			),
266 266
 		),
267 267
 		'KRW' => array(
268
-			'admin_label' => sprintf( __('South Korean Won (%1$s)', 'give'), '&#8361;'),
268
+			'admin_label' => sprintf(__('South Korean Won (%1$s)', 'give'), '&#8361;'),
269 269
 			'symbol'      => '&#8361;',
270 270
 			'setting'     => array(
271 271
 				'currency_position'   => 'before',
@@ -275,7 +275,7 @@  discard block
 block discarded – undo
275 275
 			),
276 276
 		),
277 277
 		'ZAR' => array(
278
-			'admin_label' => sprintf( __('South African Rand (%1$s)', 'give'), '&#82;'),
278
+			'admin_label' => sprintf(__('South African Rand (%1$s)', 'give'), '&#82;'),
279 279
 			'symbol'      => '&#82;',
280 280
 			'setting'     => array(
281 281
 				'currency_position'   => 'before',
@@ -285,7 +285,7 @@  discard block
 block discarded – undo
285 285
 			),
286 286
 		),
287 287
 		'SEK' => array(
288
-			'admin_label' => sprintf( __('Swedish Krona (%1$s)', 'give'), '&nbsp;kr.&nbsp;'),
288
+			'admin_label' => sprintf(__('Swedish Krona (%1$s)', 'give'), '&nbsp;kr.&nbsp;'),
289 289
 			'symbol'      => '&nbsp;kr.&nbsp;',
290 290
 			'setting'     => array(
291 291
 				'currency_position'   => 'before',
@@ -295,7 +295,7 @@  discard block
 block discarded – undo
295 295
 			),
296 296
 		),
297 297
 		'CHF' => array(
298
-			'admin_label' => sprintf( __('Swiss Franc (%1$s)', 'give'), '&#70;&#114;'),
298
+			'admin_label' => sprintf(__('Swiss Franc (%1$s)', 'give'), '&#70;&#114;'),
299 299
 			'symbol'      => '&#70;&#114;',
300 300
 			'setting'     => array(
301 301
 				'currency_position'   => 'before',
@@ -305,7 +305,7 @@  discard block
 block discarded – undo
305 305
 			),
306 306
 		),
307 307
 		'TWD' => array(
308
-			'admin_label' => sprintf( __('Taiwan New Dollars (%1$s)', 'give'), '&#78;&#84;&#36;'),
308
+			'admin_label' => sprintf(__('Taiwan New Dollars (%1$s)', 'give'), '&#78;&#84;&#36;'),
309 309
 			'symbol'      => '&#78;&#84;&#36;',
310 310
 			'setting'     => array(
311 311
 				'currency_position'   => 'before',
@@ -315,7 +315,7 @@  discard block
 block discarded – undo
315 315
 			),
316 316
 		),
317 317
 		'THB' => array(
318
-			'admin_label' => sprintf( __('Thai Baht (%1$s)', 'give'), '&#3647;'),
318
+			'admin_label' => sprintf(__('Thai Baht (%1$s)', 'give'), '&#3647;'),
319 319
 			'symbol'      => '&#3647;',
320 320
 			'setting'     => array(
321 321
 				'currency_position'   => 'before',
@@ -325,7 +325,7 @@  discard block
 block discarded – undo
325 325
 			),
326 326
 		),
327 327
 		'INR' => array(
328
-			'admin_label' => sprintf( __('Indian Rupee (%1$s)', 'give'), '&#8377;'),
328
+			'admin_label' => sprintf(__('Indian Rupee (%1$s)', 'give'), '&#8377;'),
329 329
 			'symbol'      => '&#8377;',
330 330
 			'setting'     => array(
331 331
 				'currency_position'   => 'before',
@@ -335,7 +335,7 @@  discard block
 block discarded – undo
335 335
 			),
336 336
 		),
337 337
 		'TRY' => array(
338
-			'admin_label' => sprintf( __('Turkish Lira (%1$s)', 'give'), '&#8378;'),
338
+			'admin_label' => sprintf(__('Turkish Lira (%1$s)', 'give'), '&#8378;'),
339 339
 			'symbol'      => '&#8378;',
340 340
 			'setting'     => array(
341 341
 				'currency_position'   => 'after',
@@ -345,7 +345,7 @@  discard block
 block discarded – undo
345 345
 			),
346 346
 		),
347 347
 		'IRR' => array(
348
-			'admin_label' => sprintf( __('Iranian Rial (%1$s)', 'give'), '&#xfdfc;'),
348
+			'admin_label' => sprintf(__('Iranian Rial (%1$s)', 'give'), '&#xfdfc;'),
349 349
 			'symbol'      => '&#xfdfc;',
350 350
 			'setting'     => array(
351 351
 				'currency_position'   => 'after',
@@ -355,7 +355,7 @@  discard block
 block discarded – undo
355 355
 			),
356 356
 		),
357 357
 		'RUB' => array(
358
-			'admin_label' => sprintf( __('Russian Rubles (%1$s)', 'give'), '&#8381;'),
358
+			'admin_label' => sprintf(__('Russian Rubles (%1$s)', 'give'), '&#8381;'),
359 359
 			'symbol'      => '&#8381;',
360 360
 			'setting'     => array(
361 361
 				'currency_position'   => 'before',
@@ -365,7 +365,7 @@  discard block
 block discarded – undo
365 365
 			),
366 366
 		),
367 367
 		'AED' => array(
368
-			'admin_label' => sprintf( __('United Arab Emirates dirham (%1$s)', 'give'), '&#x62f;.&#x625;'),
368
+			'admin_label' => sprintf(__('United Arab Emirates dirham (%1$s)', 'give'), '&#x62f;.&#x625;'),
369 369
 			'symbol'      => '&#x62f;.&#x625;',
370 370
 			'setting'     => array(
371 371
 				'currency_position'   => 'before',
@@ -375,7 +375,7 @@  discard block
 block discarded – undo
375 375
 			),
376 376
 		),
377 377
 		'AMD' => array(
378
-			'admin_label' => sprintf( __('Armenian dram (%1$s)', 'give'), 'AMD'),
378
+			'admin_label' => sprintf(__('Armenian dram (%1$s)', 'give'), 'AMD'),
379 379
 			'symbol'      => 'AMD', // Add backward compatibility. Using AMD in place of &#1423;
380 380
 			'setting'     => array(
381 381
 				'currency_position'   => 'before',
@@ -385,7 +385,7 @@  discard block
 block discarded – undo
385 385
 			),
386 386
 		),
387 387
 		'ANG' => array(
388
-			'admin_label' => sprintf( __('Netherlands Antillean guilder (%1$s)', 'give'), '&#402;'),
388
+			'admin_label' => sprintf(__('Netherlands Antillean guilder (%1$s)', 'give'), '&#402;'),
389 389
 			'symbol'      => '&#402;',
390 390
 			'setting'     => array(
391 391
 				'currency_position'   => 'before',
@@ -395,7 +395,7 @@  discard block
 block discarded – undo
395 395
 			),
396 396
 		),
397 397
 		'ARS' => array(
398
-			'admin_label' => sprintf( __('Argentine peso (%1$s)', 'give'), '&#36;'),
398
+			'admin_label' => sprintf(__('Argentine peso (%1$s)', 'give'), '&#36;'),
399 399
 			'symbol'      => '&#36;',
400 400
 			'setting'     => array(
401 401
 				'currency_position'   => 'before',
@@ -405,7 +405,7 @@  discard block
 block discarded – undo
405 405
 			),
406 406
 		),
407 407
 		'AWG' => array(
408
-			'admin_label' => sprintf( __( 'Aruban florin (%1$s)', 'give' ), '&#402;' ),
408
+			'admin_label' => sprintf(__('Aruban florin (%1$s)', 'give'), '&#402;'),
409 409
 			'symbol'      => '&#402;',
410 410
 			'setting'     => array(
411 411
 				'currency_position'   => 'before',
@@ -415,7 +415,7 @@  discard block
 block discarded – undo
415 415
 			),
416 416
 		),
417 417
 		'BAM' => array(
418
-			'admin_label' => sprintf( __( 'Bosnia and Herzegovina convertible mark (%1$s)', 'give' ), '&#75;&#77;' ),
418
+			'admin_label' => sprintf(__('Bosnia and Herzegovina convertible mark (%1$s)', 'give'), '&#75;&#77;'),
419 419
 			'symbol'      => '&#75;&#77;',
420 420
 			'setting'     => array(
421 421
 				'currency_position'   => 'before',
@@ -425,7 +425,7 @@  discard block
 block discarded – undo
425 425
 			),
426 426
 		),
427 427
 		'BDT' => array(
428
-			'admin_label' => sprintf( __( 'Bangladeshi taka (%1$s)', 'give' ), '&#2547;' ),
428
+			'admin_label' => sprintf(__('Bangladeshi taka (%1$s)', 'give'), '&#2547;'),
429 429
 			'symbol'      => '&#2547;',
430 430
 			'setting'     => array(
431 431
 				'currency_position'   => 'before',
@@ -435,7 +435,7 @@  discard block
 block discarded – undo
435 435
 			),
436 436
 		),
437 437
 		'BHD' => array(
438
-			'admin_label' => sprintf( __( 'Bahraini dinar (%1$s)', 'give' ), '.&#x62f;.&#x628;' ),
438
+			'admin_label' => sprintf(__('Bahraini dinar (%1$s)', 'give'), '.&#x62f;.&#x628;'),
439 439
 			'symbol'      => '.&#x62f;.&#x628;',
440 440
 			'setting'     => array(
441 441
 				'currency_position'   => 'before',
@@ -445,7 +445,7 @@  discard block
 block discarded – undo
445 445
 			),
446 446
 		),
447 447
 		'BMD' => array(
448
-			'admin_label' => sprintf( __( 'Bermudian dollar (%1$s)', 'give' ), '&#66;&#68;&#36;' ),
448
+			'admin_label' => sprintf(__('Bermudian dollar (%1$s)', 'give'), '&#66;&#68;&#36;'),
449 449
 			'symbol'      => '&#66;&#68;&#36;',
450 450
 			'setting'     => array(
451 451
 				'currency_position'   => 'before',
@@ -455,7 +455,7 @@  discard block
 block discarded – undo
455 455
 			),
456 456
 		),
457 457
 		'BND' => array(
458
-			'admin_label' => sprintf( __( 'Brunei dollar (%1$s)', 'give' ), '&#66;&#36;' ),
458
+			'admin_label' => sprintf(__('Brunei dollar (%1$s)', 'give'), '&#66;&#36;'),
459 459
 			'symbol'      => '&#66;&#36;',
460 460
 			'setting'     => array(
461 461
 				'currency_position'   => 'before',
@@ -465,7 +465,7 @@  discard block
 block discarded – undo
465 465
 			),
466 466
 		),
467 467
 		'BOB' => array(
468
-			'admin_label' => sprintf( __( 'Bolivian boliviano (%1$s)', 'give' ), '&#66;&#115;&#46;' ),
468
+			'admin_label' => sprintf(__('Bolivian boliviano (%1$s)', 'give'), '&#66;&#115;&#46;'),
469 469
 			'symbol'      => '&#66;&#115;&#46;',
470 470
 			'setting'     => array(
471 471
 				'currency_position'   => 'before',
@@ -475,7 +475,7 @@  discard block
 block discarded – undo
475 475
 			),
476 476
 		),
477 477
 		'BSD' => array(
478
-			'admin_label' => sprintf( __( 'Bahamian dollar (%1$s)', 'give' ), '&#66;&#36;' ),
478
+			'admin_label' => sprintf(__('Bahamian dollar (%1$s)', 'give'), '&#66;&#36;'),
479 479
 			'symbol'      => '&#66;&#36;',
480 480
 			'setting'     => array(
481 481
 				'currency_position'   => 'before',
@@ -485,7 +485,7 @@  discard block
 block discarded – undo
485 485
 			),
486 486
 		),
487 487
 		'BWP' => array(
488
-			'admin_label' => sprintf( __( 'Botswana pula (%1$s)', 'give' ), '&#80;' ),
488
+			'admin_label' => sprintf(__('Botswana pula (%1$s)', 'give'), '&#80;'),
489 489
 			'symbol'      => '&#80;',
490 490
 			'setting'     => array(
491 491
 				'currency_position'   => 'before',
@@ -495,7 +495,7 @@  discard block
 block discarded – undo
495 495
 			),
496 496
 		),
497 497
 		'BZD' => array(
498
-			'admin_label' => sprintf( __( 'Belizean dollar (%1$s)', 'give' ), '&#66;&#90;&#36;' ),
498
+			'admin_label' => sprintf(__('Belizean dollar (%1$s)', 'give'), '&#66;&#90;&#36;'),
499 499
 			'symbol'      => '&#66;&#90;&#36;',
500 500
 			'setting'     => array(
501 501
 				'currency_position'   => 'before',
@@ -505,7 +505,7 @@  discard block
 block discarded – undo
505 505
 			),
506 506
 		),
507 507
 		'CLP' => array(
508
-			'admin_label' => sprintf( __( 'Chilean peso (%1$s)', 'give' ), '&#36;' ),
508
+			'admin_label' => sprintf(__('Chilean peso (%1$s)', 'give'), '&#36;'),
509 509
 			'symbol'      => '&#36;',
510 510
 			'setting'     => array(
511 511
 				'currency_position'   => 'before',
@@ -515,7 +515,7 @@  discard block
 block discarded – undo
515 515
 			),
516 516
 		),
517 517
 		'CNY' => array(
518
-			'admin_label' => sprintf( __( 'Chinese yuan (%1$s)', 'give' ), '&yen;' ),
518
+			'admin_label' => sprintf(__('Chinese yuan (%1$s)', 'give'), '&yen;'),
519 519
 			'symbol'      => '&yen;',
520 520
 			'setting'     => array(
521 521
 				'currency_position'   => 'before',
@@ -525,7 +525,7 @@  discard block
 block discarded – undo
525 525
 			),
526 526
 		),
527 527
 		'COP' => array(
528
-			'admin_label' => sprintf( __( 'Colombian peso (%1$s)', 'give' ), '&#36;' ),
528
+			'admin_label' => sprintf(__('Colombian peso (%1$s)', 'give'), '&#36;'),
529 529
 			'symbol'      => '&#36;',
530 530
 			'setting'     => array(
531 531
 				'currency_position'   => 'before',
@@ -535,7 +535,7 @@  discard block
 block discarded – undo
535 535
 			),
536 536
 		),
537 537
 		'CRC' => array(
538
-			'admin_label' => sprintf( __( 'Costa Rican colón (%1$s)', 'give' ), '&#8353;' ),
538
+			'admin_label' => sprintf(__('Costa Rican colón (%1$s)', 'give'), '&#8353;'),
539 539
 			'symbol'      => '&#8353;',
540 540
 			'setting'     => array(
541 541
 				'currency_position'   => 'before',
@@ -545,7 +545,7 @@  discard block
 block discarded – undo
545 545
 			),
546 546
 		),
547 547
 		'CUC' => array(
548
-			'admin_label' => sprintf( __( 'Cuban convertible peso (%1$s)', 'give' ), '&#8369;' ),
548
+			'admin_label' => sprintf(__('Cuban convertible peso (%1$s)', 'give'), '&#8369;'),
549 549
 			'symbol'      => '&#8369;',
550 550
 			'setting'     => array(
551 551
 				'currency_position'   => 'before',
@@ -555,7 +555,7 @@  discard block
 block discarded – undo
555 555
 			),
556 556
 		),
557 557
 		'CUP' => array(
558
-			'admin_label' => sprintf( __( 'Cuban convertible peso (%1$s)', 'give' ), '&#8369;' ),
558
+			'admin_label' => sprintf(__('Cuban convertible peso (%1$s)', 'give'), '&#8369;'),
559 559
 			'symbol'      => '&#8369;',
560 560
 			'setting'     => array(
561 561
 				'currency_position'   => 'before',
@@ -565,7 +565,7 @@  discard block
 block discarded – undo
565 565
 			),
566 566
 		),
567 567
 		'DOP' => array(
568
-			'admin_label' => sprintf( __( 'Dominican peso (%1$s)', 'give' ), '&#82;&#68;&#36;' ),
568
+			'admin_label' => sprintf(__('Dominican peso (%1$s)', 'give'), '&#82;&#68;&#36;'),
569 569
 			'symbol'      => '&#82;&#68;&#36;',
570 570
 			'setting'     => array(
571 571
 				'currency_position'   => 'before',
@@ -575,7 +575,7 @@  discard block
 block discarded – undo
575 575
 			),
576 576
 		),
577 577
 		'EGP' => array(
578
-			'admin_label' => sprintf( __( 'Egyptian pound (%1$s)', 'give' ), '&#69;&pound;' ),
578
+			'admin_label' => sprintf(__('Egyptian pound (%1$s)', 'give'), '&#69;&pound;'),
579 579
 			'symbol'      => '&#69;&pound;',
580 580
 			'setting'     => array(
581 581
 				'currency_position'   => 'before',
@@ -585,7 +585,7 @@  discard block
 block discarded – undo
585 585
 			),
586 586
 		),
587 587
 		'GIP' => array(
588
-			'admin_label' => sprintf( __( 'Gibraltar pound (%1$s)', 'give' ), '&pound;' ),
588
+			'admin_label' => sprintf(__('Gibraltar pound (%1$s)', 'give'), '&pound;'),
589 589
 			'symbol'      => '&pound;',
590 590
 			'setting'     => array(
591 591
 				'currency_position'   => 'before',
@@ -595,7 +595,7 @@  discard block
 block discarded – undo
595 595
 			),
596 596
 		),
597 597
 		'GTQ' => array(
598
-			'admin_label' => sprintf( __( 'Guatemalan quetzal (%1$s)', 'give' ), '&#81;' ),
598
+			'admin_label' => sprintf(__('Guatemalan quetzal (%1$s)', 'give'), '&#81;'),
599 599
 			'symbol'      => '&#81;',
600 600
 			'setting'     => array(
601 601
 				'currency_position'   => 'before',
@@ -605,7 +605,7 @@  discard block
 block discarded – undo
605 605
 			),
606 606
 		),
607 607
 		'HNL' => array(
608
-			'admin_label' => sprintf( __( 'Honduran lempira (%1$s)', 'give' ), '&#76;' ),
608
+			'admin_label' => sprintf(__('Honduran lempira (%1$s)', 'give'), '&#76;'),
609 609
 			'symbol'      => '&#76;',
610 610
 			'setting'     => array(
611 611
 				'currency_position'   => 'before',
@@ -615,7 +615,7 @@  discard block
 block discarded – undo
615 615
 			),
616 616
 		),
617 617
 		'HRK' => array(
618
-			'admin_label' => sprintf( __( 'Croatian kuna (%1$s)', 'give' ), '&#107;&#110;' ),
618
+			'admin_label' => sprintf(__('Croatian kuna (%1$s)', 'give'), '&#107;&#110;'),
619 619
 			'symbol'      => '&#107;&#110;',
620 620
 			'setting'     => array(
621 621
 				'currency_position'   => 'after',
@@ -625,7 +625,7 @@  discard block
 block discarded – undo
625 625
 			),
626 626
 		),
627 627
 		'IDR' => array(
628
-			'admin_label' => sprintf( __( 'Indonesian rupiah (%1$s)', 'give' ), '&#82;&#112;' ),
628
+			'admin_label' => sprintf(__('Indonesian rupiah (%1$s)', 'give'), '&#82;&#112;'),
629 629
 			'symbol'      => '&#82;&#112;',
630 630
 			'setting'     => array(
631 631
 				'currency_position'   => 'before',
@@ -635,7 +635,7 @@  discard block
 block discarded – undo
635 635
 			),
636 636
 		),
637 637
 		'ISK' => array(
638
-			'admin_label' => sprintf( __( 'Icelandic króna (%1$s)', 'give' ), '&#107;&#114;' ),
638
+			'admin_label' => sprintf(__('Icelandic króna (%1$s)', 'give'), '&#107;&#114;'),
639 639
 			'symbol'      => '&#107;&#114;',
640 640
 			'setting'     => array(
641 641
 				'currency_position'   => 'after',
@@ -645,7 +645,7 @@  discard block
 block discarded – undo
645 645
 			),
646 646
 		),
647 647
 		'JMD' => array(
648
-			'admin_label' => sprintf( __( 'Jamaican dollar (%1$s)', 'give' ), '&#106;&#36;' ),
648
+			'admin_label' => sprintf(__('Jamaican dollar (%1$s)', 'give'), '&#106;&#36;'),
649 649
 			'symbol'      => '&#106;&#36;',
650 650
 			'setting'     => array(
651 651
 				'currency_position'   => 'before',
@@ -655,7 +655,7 @@  discard block
 block discarded – undo
655 655
 			),
656 656
 		),
657 657
 		'JOD' => array(
658
-			'admin_label' => sprintf( __( 'Jordanian dinar (%1$s)', 'give' ), '&#x62f;.&#x627;' ),
658
+			'admin_label' => sprintf(__('Jordanian dinar (%1$s)', 'give'), '&#x62f;.&#x627;'),
659 659
 			'symbol'      => '&#x62f;.&#x627;',
660 660
 			'setting'     => array(
661 661
 				'currency_position'   => 'before',
@@ -665,7 +665,7 @@  discard block
 block discarded – undo
665 665
 			),
666 666
 		),
667 667
 		'KES' => array(
668
-			'admin_label' => sprintf( __( 'Kenyan shilling (%1$s)', 'give' ), '&#75;&#83;&#104;' ),
668
+			'admin_label' => sprintf(__('Kenyan shilling (%1$s)', 'give'), '&#75;&#83;&#104;'),
669 669
 			'symbol'      => '&#75;&#83;&#104;',
670 670
 			'setting'     => array(
671 671
 				'currency_position'   => 'before',
@@ -675,7 +675,7 @@  discard block
 block discarded – undo
675 675
 			),
676 676
 		),
677 677
 		'KWD' => array(
678
-			'admin_label' => sprintf( __( 'Kuwaiti dinar (%1$s)', 'give' ), '&#x62f;.&#x643;' ),
678
+			'admin_label' => sprintf(__('Kuwaiti dinar (%1$s)', 'give'), '&#x62f;.&#x643;'),
679 679
 			'symbol'      => '&#x62f;.&#x643;',
680 680
 			'setting'     => array(
681 681
 				'currency_position'   => 'before',
@@ -685,7 +685,7 @@  discard block
 block discarded – undo
685 685
 			),
686 686
 		),
687 687
 		'KYD' => array(
688
-			'admin_label' => sprintf( __( 'Cayman Islands dollar (%1$s)', 'give' ), '&#75;&#89;&#36;' ),
688
+			'admin_label' => sprintf(__('Cayman Islands dollar (%1$s)', 'give'), '&#75;&#89;&#36;'),
689 689
 			'symbol'      => '&#75;&#89;&#36;',
690 690
 			'setting'     => array(
691 691
 				'currency_position'   => 'before',
@@ -695,7 +695,7 @@  discard block
 block discarded – undo
695 695
 			),
696 696
 		),
697 697
 		'MKD' => array(
698
-			'admin_label' => sprintf( __( 'Macedonian denar (%1$s)', 'give' ), '&#x434;&#x435;&#x43d;' ),
698
+			'admin_label' => sprintf(__('Macedonian denar (%1$s)', 'give'), '&#x434;&#x435;&#x43d;'),
699 699
 			'symbol'      => '&#x434;&#x435;&#x43d;',
700 700
 			'setting'     => array(
701 701
 				'currency_position'   => 'before',
@@ -705,7 +705,7 @@  discard block
 block discarded – undo
705 705
 			),
706 706
 		),
707 707
 		'NPR' => array(
708
-			'admin_label' => sprintf( __( 'Nepalese rupee (%1$s)', 'give' ), '&#8360;' ),
708
+			'admin_label' => sprintf(__('Nepalese rupee (%1$s)', 'give'), '&#8360;'),
709 709
 			'symbol'      => '&#8360;',
710 710
 			'setting'     => array(
711 711
 				'currency_position'   => 'before',
@@ -715,7 +715,7 @@  discard block
 block discarded – undo
715 715
 			),
716 716
 		),
717 717
 		'OMR' => array(
718
-			'admin_label' => sprintf( __( 'Omani rial (%1$s)', 'give' ), '&#x631;.&#x639;&#46;' ),
718
+			'admin_label' => sprintf(__('Omani rial (%1$s)', 'give'), '&#x631;.&#x639;&#46;'),
719 719
 			'symbol'      => '&#x631;.&#x639;&#46;',
720 720
 			'setting'     => array(
721 721
 				'currency_position'   => 'before',
@@ -725,7 +725,7 @@  discard block
 block discarded – undo
725 725
 			),
726 726
 		),
727 727
 		'PEN' => array(
728
-			'admin_label' => sprintf( __( 'Peruvian nuevo sol (%1$s)', 'give' ), 'S/.' ),
728
+			'admin_label' => sprintf(__('Peruvian nuevo sol (%1$s)', 'give'), 'S/.'),
729 729
 			'symbol'      => 'S/.',
730 730
 			'setting'     => array(
731 731
 				'currency_position'   => 'before',
@@ -735,7 +735,7 @@  discard block
 block discarded – undo
735 735
 			),
736 736
 		),
737 737
 		'PKR' => array(
738
-			'admin_label' => sprintf( __( 'Pakistani rupee (%1$s)', 'give' ), '&#8360;' ),
738
+			'admin_label' => sprintf(__('Pakistani rupee (%1$s)', 'give'), '&#8360;'),
739 739
 			'symbol'      => '&#8360;',
740 740
 			'setting'     => array(
741 741
 				'currency_position'   => 'before',
@@ -745,7 +745,7 @@  discard block
 block discarded – undo
745 745
 			),
746 746
 		),
747 747
 		'RON' => array(
748
-			'admin_label' => sprintf( __( 'Romanian leu (%1$s)', 'give' ), '&#76;' ),
748
+			'admin_label' => sprintf(__('Romanian leu (%1$s)', 'give'), '&#76;'),
749 749
 			'symbol'      => '&#76;',
750 750
 			'setting'     => array(
751 751
 				'currency_position'   => 'after',
@@ -755,7 +755,7 @@  discard block
 block discarded – undo
755 755
 			),
756 756
 		),
757 757
 		'SAR' => array(
758
-			'admin_label' => sprintf( __( 'Saudi riyal (%1$s)', 'give' ), '&#x631;.&#x633;' ),
758
+			'admin_label' => sprintf(__('Saudi riyal (%1$s)', 'give'), '&#x631;.&#x633;'),
759 759
 			'symbol'      => '&#x631;.&#x633;',
760 760
 			'setting'     => array(
761 761
 				'currency_position'   => 'before',
@@ -765,7 +765,7 @@  discard block
 block discarded – undo
765 765
 			),
766 766
 		),
767 767
 		'SZL' => array(
768
-			'admin_label' => sprintf( __( 'Swazi lilangeni (%1$s)', 'give' ), '&#76;'),
768
+			'admin_label' => sprintf(__('Swazi lilangeni (%1$s)', 'give'), '&#76;'),
769 769
 			'symbol'      => '&#76;',
770 770
 			'setting'     => array(
771 771
 				'currency_position'   => 'before',
@@ -775,7 +775,7 @@  discard block
 block discarded – undo
775 775
 			),
776 776
 		),
777 777
 		'TOP' => array(
778
-			'admin_label' => sprintf( __( 'Tongan paʻanga (%1$s)', 'give' ), '&#84;&#36;'),
778
+			'admin_label' => sprintf(__('Tongan paʻanga (%1$s)', 'give'), '&#84;&#36;'),
779 779
 			'symbol'      => '&#84;&#36;',
780 780
 			'setting'     => array(
781 781
 				'currency_position'   => 'before',
@@ -785,7 +785,7 @@  discard block
 block discarded – undo
785 785
 			),
786 786
 		),
787 787
 		'TZS' => array(
788
-			'admin_label' => sprintf( __( 'Tanzanian shilling (%1$s)', 'give' ), '&#84;&#83;&#104;'),
788
+			'admin_label' => sprintf(__('Tanzanian shilling (%1$s)', 'give'), '&#84;&#83;&#104;'),
789 789
 			'symbol'      => '&#84;&#83;&#104;',
790 790
 			'setting'     => array(
791 791
 				'currency_position'   => 'before',
@@ -795,7 +795,7 @@  discard block
 block discarded – undo
795 795
 			),
796 796
 		),
797 797
 		'UAH' => array(
798
-			'admin_label' => sprintf( __( 'Ukrainian hryvnia (%1$s)', 'give' ), '&#8372;'),
798
+			'admin_label' => sprintf(__('Ukrainian hryvnia (%1$s)', 'give'), '&#8372;'),
799 799
 			'symbol'      => '&#8372;',
800 800
 			'setting'     => array(
801 801
 				'currency_position'   => 'before',
@@ -805,7 +805,7 @@  discard block
 block discarded – undo
805 805
 			),
806 806
 		),
807 807
 		'UYU' => array(
808
-			'admin_label' => sprintf( __( 'Uruguayan peso (%1$s)', 'give' ), '&#36;&#85;'),
808
+			'admin_label' => sprintf(__('Uruguayan peso (%1$s)', 'give'), '&#36;&#85;'),
809 809
 			'symbol'      => '&#36;&#85;',
810 810
 			'setting'     => array(
811 811
 				'currency_position'   => 'before',
@@ -815,7 +815,7 @@  discard block
 block discarded – undo
815 815
 			),
816 816
 		),
817 817
 		'VEF' => array(
818
-			'admin_label' => sprintf( __( 'Venezuelan bolívar (%1$s)', 'give' ), '&#66;&#115;'),
818
+			'admin_label' => sprintf(__('Venezuelan bolívar (%1$s)', 'give'), '&#66;&#115;'),
819 819
 			'symbol'      => '&#66;&#115;',
820 820
 			'setting'     => array(
821 821
 				'currency_position'   => 'before',
@@ -825,7 +825,7 @@  discard block
 block discarded – undo
825 825
 			),
826 826
 		),
827 827
 		'XCD' => array(
828
-			'admin_label' => sprintf( __( 'East Caribbean dollar (%1$s)', 'give' ), '&#69;&#67;&#36;'),
828
+			'admin_label' => sprintf(__('East Caribbean dollar (%1$s)', 'give'), '&#69;&#67;&#36;'),
829 829
 			'symbol'      => '&#69;&#67;&#36;',
830 830
 			'setting'     => array(
831 831
 				'currency_position'   => 'before',
@@ -835,7 +835,7 @@  discard block
 block discarded – undo
835 835
 			),
836 836
 		),
837 837
 		'AFN' => array(
838
-			'admin_label' => sprintf( __('Afghan afghani (%1$s)', 'give'), '&#x60b;'),
838
+			'admin_label' => sprintf(__('Afghan afghani (%1$s)', 'give'), '&#x60b;'),
839 839
 			'symbol'      => '&#x60b;',
840 840
 			'setting'     => array(
841 841
 				'currency_position'   => 'before',
@@ -845,7 +845,7 @@  discard block
 block discarded – undo
845 845
 			),
846 846
 		),
847 847
 		'ALL' => array(
848
-			'admin_label' => sprintf( __('Albanian lek (%1$s)', 'give'), 'L'),
848
+			'admin_label' => sprintf(__('Albanian lek (%1$s)', 'give'), 'L'),
849 849
 			'symbol'      => 'L',
850 850
 			'setting'     => array(
851 851
 				'currency_position'   => 'after',
@@ -855,7 +855,7 @@  discard block
 block discarded – undo
855 855
 			),
856 856
 		),
857 857
 		'AOA' => array(
858
-			'admin_label' => sprintf( __('Angolan kwanza (%1$s)', 'give'), 'Kz'),
858
+			'admin_label' => sprintf(__('Angolan kwanza (%1$s)', 'give'), 'Kz'),
859 859
 			'symbol'      => 'Kz',
860 860
 			'setting'     => array(
861 861
 				'currency_position'   => 'before',
@@ -865,7 +865,7 @@  discard block
 block discarded – undo
865 865
 			),
866 866
 		),
867 867
 		'AZN' => array(
868
-			'admin_label' => sprintf( __('Azerbaijani manat (%1$s)', 'give'), 'AZN'),
868
+			'admin_label' => sprintf(__('Azerbaijani manat (%1$s)', 'give'), 'AZN'),
869 869
 			'symbol'      => 'AZN',
870 870
 			'setting'     => array(
871 871
 				'currency_position'   => 'after',
@@ -875,7 +875,7 @@  discard block
 block discarded – undo
875 875
 			),
876 876
 		),
877 877
 		'BBD' => array(
878
-			'admin_label' => sprintf( __('Barbadian dollar (%1$s)', 'give'), '&#36;'),
878
+			'admin_label' => sprintf(__('Barbadian dollar (%1$s)', 'give'), '&#36;'),
879 879
 			'symbol'      => '&#36;',
880 880
 			'setting'     => array(
881 881
 				'currency_position'   => 'before',
@@ -885,7 +885,7 @@  discard block
 block discarded – undo
885 885
 			),
886 886
 		),
887 887
 		'BGN' => array(
888
-			'admin_label' => sprintf( __('Bulgarian lev (%1$s)', 'give'), '&#1083;&#1074;.'),
888
+			'admin_label' => sprintf(__('Bulgarian lev (%1$s)', 'give'), '&#1083;&#1074;.'),
889 889
 			'symbol'      => '&#1083;&#1074;.',
890 890
 			'setting'     => array(
891 891
 				'currency_position'   => 'after',
@@ -895,7 +895,7 @@  discard block
 block discarded – undo
895 895
 			),
896 896
 		),
897 897
 		'BIF' => array(
898
-			'admin_label' => sprintf( __('Burundian franc (%1$s)', 'give'), 'Fr'),
898
+			'admin_label' => sprintf(__('Burundian franc (%1$s)', 'give'), 'Fr'),
899 899
 			'symbol'      => 'Fr',
900 900
 			'setting'     => array(
901 901
 				'currency_position'   => 'after',
@@ -905,7 +905,7 @@  discard block
 block discarded – undo
905 905
 			),
906 906
 		),
907 907
 		'BTC' => array(
908
-			'admin_label' => sprintf( __('Bitcoin (%1$s)', 'give'), '&#3647;'),
908
+			'admin_label' => sprintf(__('Bitcoin (%1$s)', 'give'), '&#3647;'),
909 909
 			'symbol'      => '&#3647;',
910 910
 			'setting'     => array(
911 911
 				'currency_position'   => 'after',
@@ -915,7 +915,7 @@  discard block
 block discarded – undo
915 915
 			),
916 916
 		),
917 917
 		'BTN' => array(
918
-			'admin_label' => sprintf( __('Bhutanese ngultrum (%1$s)', 'give'), 'Nu.'),
918
+			'admin_label' => sprintf(__('Bhutanese ngultrum (%1$s)', 'give'), 'Nu.'),
919 919
 			'symbol'      => 'Nu.',
920 920
 			'setting'     => array(
921 921
 				'currency_position'   => 'before',
@@ -925,7 +925,7 @@  discard block
 block discarded – undo
925 925
 			),
926 926
 		),
927 927
 		'BYR' => array(
928
-			'admin_label' => sprintf( __('Belarusian ruble (old) (%1$s)', 'give'), 'Br'),
928
+			'admin_label' => sprintf(__('Belarusian ruble (old) (%1$s)', 'give'), 'Br'),
929 929
 			'symbol'      => 'Br',
930 930
 			'setting'     => array(
931 931
 				'currency_position'   => 'after',
@@ -935,7 +935,7 @@  discard block
 block discarded – undo
935 935
 			),
936 936
 		),
937 937
 		'BYN' => array(
938
-			'admin_label' => sprintf( __('Belarusian ruble (%1$s)', 'give'), 'Br'),
938
+			'admin_label' => sprintf(__('Belarusian ruble (%1$s)', 'give'), 'Br'),
939 939
 			'symbol'      => 'Br',
940 940
 			'setting'     => array(
941 941
 				'currency_position'   => 'after',
@@ -945,7 +945,7 @@  discard block
 block discarded – undo
945 945
 			),
946 946
 		),
947 947
 		'CDF' => array(
948
-			'admin_label' => sprintf( __('Congolese franc (%1$s)', 'give'), 'Fr'),
948
+			'admin_label' => sprintf(__('Congolese franc (%1$s)', 'give'), 'Fr'),
949 949
 			'symbol'      => 'Fr',
950 950
 			'setting'     => array(
951 951
 				'currency_position'   => 'after',
@@ -955,7 +955,7 @@  discard block
 block discarded – undo
955 955
 			),
956 956
 		),
957 957
 		'CVE' => array(
958
-			'admin_label' => sprintf( __('Cape Verdean escudo (%1$s)', 'give'), '&#36;'),
958
+			'admin_label' => sprintf(__('Cape Verdean escudo (%1$s)', 'give'), '&#36;'),
959 959
 			'symbol'      => '&#36;',
960 960
 			'setting'     => array(
961 961
 				'currency_position'   => 'before',
@@ -965,7 +965,7 @@  discard block
 block discarded – undo
965 965
 			),
966 966
 		),
967 967
 		'DJF' => array(
968
-			'admin_label' => sprintf( __('Djiboutian franc (%1$s)', 'give'), 'Fr'),
968
+			'admin_label' => sprintf(__('Djiboutian franc (%1$s)', 'give'), 'Fr'),
969 969
 			'symbol'      => 'Fr',
970 970
 			'setting'     => array(
971 971
 				'currency_position'   => 'after',
@@ -975,7 +975,7 @@  discard block
 block discarded – undo
975 975
 			),
976 976
 		),
977 977
 		'DZD' => array(
978
-			'admin_label' => sprintf( __('Algerian dinar (%1$s)', 'give'), '&#x62f;.&#x62c;'),
978
+			'admin_label' => sprintf(__('Algerian dinar (%1$s)', 'give'), '&#x62f;.&#x62c;'),
979 979
 			'symbol'      => '&#x62f;.&#x62c;',
980 980
 			'setting'     => array(
981 981
 				'currency_position'   => 'before',
@@ -985,7 +985,7 @@  discard block
 block discarded – undo
985 985
 			),
986 986
 		),
987 987
 		'ERN' => array(
988
-			'admin_label' => sprintf( __('Eritrean nakfa (%1$s)', 'give'), 'Nfk'),
988
+			'admin_label' => sprintf(__('Eritrean nakfa (%1$s)', 'give'), 'Nfk'),
989 989
 			'symbol'      => 'Nfk',
990 990
 			'setting'     => array(
991 991
 				'currency_position'   => 'after',
@@ -995,7 +995,7 @@  discard block
 block discarded – undo
995 995
 			),
996 996
 		),
997 997
 		'ETB' => array(
998
-			'admin_label' => sprintf( __('Ethiopian birr (%1$s)', 'give'), 'Br'),
998
+			'admin_label' => sprintf(__('Ethiopian birr (%1$s)', 'give'), 'Br'),
999 999
 			'symbol'      => 'Br',
1000 1000
 			'setting'     => array(
1001 1001
 				'currency_position'   => 'before',
@@ -1005,7 +1005,7 @@  discard block
 block discarded – undo
1005 1005
 			),
1006 1006
 		),
1007 1007
 		'FJD' => array(
1008
-			'admin_label' => sprintf( __('Fijian dollar (%1$s)', 'give'), '&#36;'),
1008
+			'admin_label' => sprintf(__('Fijian dollar (%1$s)', 'give'), '&#36;'),
1009 1009
 			'symbol'      => '&#36;',
1010 1010
 			'setting'     => array(
1011 1011
 				'currency_position'   => 'before',
@@ -1015,7 +1015,7 @@  discard block
 block discarded – undo
1015 1015
 			),
1016 1016
 		),
1017 1017
 		'FKP' => array(
1018
-			'admin_label' => sprintf( __('Falkland Islands pound (%1$s)', 'give'), '&pound;'),
1018
+			'admin_label' => sprintf(__('Falkland Islands pound (%1$s)', 'give'), '&pound;'),
1019 1019
 			'symbol'      => '&pound;',
1020 1020
 			'setting'     => array(
1021 1021
 				'currency_position'   => 'before',
@@ -1025,7 +1025,7 @@  discard block
 block discarded – undo
1025 1025
 			),
1026 1026
 		),
1027 1027
 		'GEL' => array(
1028
-			'admin_label' => sprintf( __('Georgian lari (%1$s)', 'give'), '&#x20be;'),
1028
+			'admin_label' => sprintf(__('Georgian lari (%1$s)', 'give'), '&#x20be;'),
1029 1029
 			'symbol'      => '&#x20be;',
1030 1030
 			'setting'     => array(
1031 1031
 				'currency_position'   => 'after',
@@ -1035,7 +1035,7 @@  discard block
 block discarded – undo
1035 1035
 			),
1036 1036
 		),
1037 1037
 		'GGP' => array(
1038
-			'admin_label' => sprintf( __('Guernsey pound (%1$s)', 'give'), '&pound;'),
1038
+			'admin_label' => sprintf(__('Guernsey pound (%1$s)', 'give'), '&pound;'),
1039 1039
 			'symbol'      => '&pound;',
1040 1040
 			'setting'     => array(
1041 1041
 				'currency_position'   => 'before',
@@ -1045,7 +1045,7 @@  discard block
 block discarded – undo
1045 1045
 			),
1046 1046
 		),
1047 1047
 		'GHS' => array(
1048
-			'admin_label' => sprintf( __('Ghana cedi (%1$s)', 'give'), '&#x20b5;'),
1048
+			'admin_label' => sprintf(__('Ghana cedi (%1$s)', 'give'), '&#x20b5;'),
1049 1049
 			'symbol'      => '&#x20b5;',
1050 1050
 			'setting'     => array(
1051 1051
 				'currency_position'   => 'before',
@@ -1055,7 +1055,7 @@  discard block
 block discarded – undo
1055 1055
 			),
1056 1056
 		),
1057 1057
 		'GMD' => array(
1058
-			'admin_label' => sprintf( __('Gambian dalasi (%1$s)', 'give'), 'D'),
1058
+			'admin_label' => sprintf(__('Gambian dalasi (%1$s)', 'give'), 'D'),
1059 1059
 			'symbol'      => 'D',
1060 1060
 			'setting'     => array(
1061 1061
 				'currency_position'   => 'after',
@@ -1065,7 +1065,7 @@  discard block
 block discarded – undo
1065 1065
 			),
1066 1066
 		),
1067 1067
 		'GNF' => array(
1068
-			'admin_label' => sprintf( __('Guinean franc (%1$s)', 'give'), 'Fr'),
1068
+			'admin_label' => sprintf(__('Guinean franc (%1$s)', 'give'), 'Fr'),
1069 1069
 			'symbol'      => 'Fr',
1070 1070
 			'setting'     => array(
1071 1071
 				'currency_position'   => 'after',
@@ -1075,7 +1075,7 @@  discard block
 block discarded – undo
1075 1075
 			),
1076 1076
 		),
1077 1077
 		'GYD' => array(
1078
-			'admin_label' => sprintf( __('Guyanese dollar (%1$s)', 'give'), '&#36;'),
1078
+			'admin_label' => sprintf(__('Guyanese dollar (%1$s)', 'give'), '&#36;'),
1079 1079
 			'symbol'      => '&#36;',
1080 1080
 			'setting'     => array(
1081 1081
 				'currency_position'   => 'before',
@@ -1085,7 +1085,7 @@  discard block
 block discarded – undo
1085 1085
 			),
1086 1086
 		),
1087 1087
 		'HTG' => array(
1088
-			'admin_label' => sprintf( __('Haitian gourde (%1$s)', 'give'), 'G'),
1088
+			'admin_label' => sprintf(__('Haitian gourde (%1$s)', 'give'), 'G'),
1089 1089
 			'symbol'      => 'G',
1090 1090
 			'setting'     => array(
1091 1091
 				'currency_position'   => 'before',
@@ -1095,7 +1095,7 @@  discard block
 block discarded – undo
1095 1095
 			),
1096 1096
 		),
1097 1097
 		'IMP' => array(
1098
-			'admin_label' => sprintf( __('Manx pound (%1$s)', 'give'), '&pound;'),
1098
+			'admin_label' => sprintf(__('Manx pound (%1$s)', 'give'), '&pound;'),
1099 1099
 			'symbol'      => '&pound;',
1100 1100
 			'setting'     => array(
1101 1101
 				'currency_position'   => 'before',
@@ -1105,7 +1105,7 @@  discard block
 block discarded – undo
1105 1105
 			),
1106 1106
 		),
1107 1107
 		'IQD' => array(
1108
-			'admin_label' => sprintf( __('Iraqi dinar (%1$s)', 'give'), '&#x639;.&#x62f;'),
1108
+			'admin_label' => sprintf(__('Iraqi dinar (%1$s)', 'give'), '&#x639;.&#x62f;'),
1109 1109
 			'symbol'      => '&#x639;.&#x62f;',
1110 1110
 			'setting'     => array(
1111 1111
 				'currency_position'   => 'before',
@@ -1115,7 +1115,7 @@  discard block
 block discarded – undo
1115 1115
 			),
1116 1116
 		),
1117 1117
 		'IRT' => array(
1118
-			'admin_label' => sprintf( __('Iranian toman (%1$s)', 'give'), '&#x062A;&#x0648;&#x0645;&#x0627;&#x0646;'),
1118
+			'admin_label' => sprintf(__('Iranian toman (%1$s)', 'give'), '&#x062A;&#x0648;&#x0645;&#x0627;&#x0646;'),
1119 1119
 			'symbol'      => '&#x062A;&#x0648;&#x0645;&#x0627;&#x0646;',
1120 1120
 			'setting'     => array(
1121 1121
 				'currency_position'   => 'after',
@@ -1125,7 +1125,7 @@  discard block
 block discarded – undo
1125 1125
 			),
1126 1126
 		),
1127 1127
 		'JEP' => array(
1128
-			'admin_label' => sprintf( __('Jersey pound (%1$s)', 'give'), '&pound;'),
1128
+			'admin_label' => sprintf(__('Jersey pound (%1$s)', 'give'), '&pound;'),
1129 1129
 			'symbol'      => '&pound;',
1130 1130
 			'setting'     => array(
1131 1131
 				'currency_position'   => 'before',
@@ -1135,7 +1135,7 @@  discard block
 block discarded – undo
1135 1135
 			),
1136 1136
 		),
1137 1137
 		'KGS' => array(
1138
-			'admin_label' => sprintf( __('Kyrgyzstani som (%1$s)', 'give'), '&#x441;&#x43e;&#x43c;'),
1138
+			'admin_label' => sprintf(__('Kyrgyzstani som (%1$s)', 'give'), '&#x441;&#x43e;&#x43c;'),
1139 1139
 			'symbol'      => '&#x441;&#x43e;&#x43c;',
1140 1140
 			'setting'     => array(
1141 1141
 				'currency_position'   => 'after',
@@ -1145,7 +1145,7 @@  discard block
 block discarded – undo
1145 1145
 			),
1146 1146
 		),
1147 1147
 		'KHR' => array(
1148
-			'admin_label' => sprintf( __('Cambodian riel (%1$s)', 'give'), '&#x17db;'),
1148
+			'admin_label' => sprintf(__('Cambodian riel (%1$s)', 'give'), '&#x17db;'),
1149 1149
 			'symbol'      => '&#x17db;',
1150 1150
 			'setting'     => array(
1151 1151
 				'currency_position'   => 'after',
@@ -1155,7 +1155,7 @@  discard block
 block discarded – undo
1155 1155
 			),
1156 1156
 		),
1157 1157
 		'KMF' => array(
1158
-			'admin_label' => sprintf( __('Comorian franc (%1$s)', 'give'), 'Fr'),
1158
+			'admin_label' => sprintf(__('Comorian franc (%1$s)', 'give'), 'Fr'),
1159 1159
 			'symbol'      => 'Fr',
1160 1160
 			'setting'     => array(
1161 1161
 				'currency_position'   => 'after',
@@ -1165,7 +1165,7 @@  discard block
 block discarded – undo
1165 1165
 			),
1166 1166
 		),
1167 1167
 		'KPW' => array(
1168
-			'admin_label' => sprintf( __('North Korean won (%1$s)', 'give'), '&#x20a9;'),
1168
+			'admin_label' => sprintf(__('North Korean won (%1$s)', 'give'), '&#x20a9;'),
1169 1169
 			'symbol'      => '&#x20a9;',
1170 1170
 			'setting'     => array(
1171 1171
 				'currency_position'   => 'before',
@@ -1175,7 +1175,7 @@  discard block
 block discarded – undo
1175 1175
 			),
1176 1176
 		),
1177 1177
 		'KZT' => array(
1178
-			'admin_label' => sprintf( __('Kazakhstani tenge (%1$s)', 'give'), 'KZT'),
1178
+			'admin_label' => sprintf(__('Kazakhstani tenge (%1$s)', 'give'), 'KZT'),
1179 1179
 			'symbol'      => 'KZT',
1180 1180
 			'setting'     => array(
1181 1181
 				'currency_position'   => 'before',
@@ -1185,7 +1185,7 @@  discard block
 block discarded – undo
1185 1185
 			),
1186 1186
 		),
1187 1187
 		'LAK' => array(
1188
-			'admin_label' => sprintf( __('Lao kip (%1$s)', 'give'), '&#8365;'),
1188
+			'admin_label' => sprintf(__('Lao kip (%1$s)', 'give'), '&#8365;'),
1189 1189
 			'symbol'      => '&#8365;',
1190 1190
 			'setting'     => array(
1191 1191
 				'currency_position'   => 'after',
@@ -1195,7 +1195,7 @@  discard block
 block discarded – undo
1195 1195
 			),
1196 1196
 		),
1197 1197
 		'LBP' => array(
1198
-			'admin_label' => sprintf( __('Lebanese pound (%1$s)', 'give'), '&#x644;.&#x644;'),
1198
+			'admin_label' => sprintf(__('Lebanese pound (%1$s)', 'give'), '&#x644;.&#x644;'),
1199 1199
 			'symbol'      => '&#x644;.&#x644;',
1200 1200
 			'setting'     => array(
1201 1201
 				'currency_position'   => 'before',
@@ -1205,7 +1205,7 @@  discard block
 block discarded – undo
1205 1205
 			),
1206 1206
 		),
1207 1207
 		'LKR' => array(
1208
-			'admin_label' => sprintf( __('Sri Lankan rupee (%1$s)', 'give'), '&#xdbb;&#xdd4;'),
1208
+			'admin_label' => sprintf(__('Sri Lankan rupee (%1$s)', 'give'), '&#xdbb;&#xdd4;'),
1209 1209
 			'symbol'      => '&#xdbb;&#xdd4;',
1210 1210
 			'setting'     => array(
1211 1211
 				'currency_position'   => 'before',
@@ -1215,7 +1215,7 @@  discard block
 block discarded – undo
1215 1215
 			),
1216 1216
 		),
1217 1217
 		'LRD' => array(
1218
-			'admin_label' => sprintf( __('Liberian dollar (%1$s)', 'give'), '&#36;'),
1218
+			'admin_label' => sprintf(__('Liberian dollar (%1$s)', 'give'), '&#36;'),
1219 1219
 			'symbol'      => '&#36;',
1220 1220
 			'setting'     => array(
1221 1221
 				'currency_position'   => 'before',
@@ -1225,7 +1225,7 @@  discard block
 block discarded – undo
1225 1225
 			),
1226 1226
 		),
1227 1227
 		'LSL' => array(
1228
-			'admin_label' => sprintf( __('Lesotho loti (%1$s)', 'give'), 'L'),
1228
+			'admin_label' => sprintf(__('Lesotho loti (%1$s)', 'give'), 'L'),
1229 1229
 			'symbol'      => 'L',
1230 1230
 			'setting'     => array(
1231 1231
 				'currency_position'   => 'after',
@@ -1235,7 +1235,7 @@  discard block
 block discarded – undo
1235 1235
 			),
1236 1236
 		),
1237 1237
 		'LYD' => array(
1238
-			'admin_label' => sprintf( __('Libyan dinar (%1$s)', 'give'), '&#x644;.&#x62f;'),
1238
+			'admin_label' => sprintf(__('Libyan dinar (%1$s)', 'give'), '&#x644;.&#x62f;'),
1239 1239
 			'symbol'      => '&#x644;.&#x62f;',
1240 1240
 			'setting'     => array(
1241 1241
 				'currency_position'   => 'before',
@@ -1245,7 +1245,7 @@  discard block
 block discarded – undo
1245 1245
 			),
1246 1246
 		),
1247 1247
 		'MDL' => array(
1248
-			'admin_label' => sprintf( __('Moldovan leu (%1$s)', 'give'), 'MDL'),
1248
+			'admin_label' => sprintf(__('Moldovan leu (%1$s)', 'give'), 'MDL'),
1249 1249
 			'symbol'      => 'MDL',
1250 1250
 			'setting'     => array(
1251 1251
 				'currency_position'   => 'after',
@@ -1255,7 +1255,7 @@  discard block
 block discarded – undo
1255 1255
 			),
1256 1256
 		),
1257 1257
 		'MGA' => array(
1258
-			'admin_label' => sprintf( __('Malagasy ariary (%1$s)', 'give'), 'Ar'),
1258
+			'admin_label' => sprintf(__('Malagasy ariary (%1$s)', 'give'), 'Ar'),
1259 1259
 			'symbol'      => 'Ar',
1260 1260
 			'setting'     => array(
1261 1261
 				'currency_position'   => 'before',
@@ -1265,7 +1265,7 @@  discard block
 block discarded – undo
1265 1265
 			),
1266 1266
 		),
1267 1267
 		'MMK' => array(
1268
-			'admin_label' => sprintf( __('Burmese kyat (%1$s)', 'give'), 'Ks'),
1268
+			'admin_label' => sprintf(__('Burmese kyat (%1$s)', 'give'), 'Ks'),
1269 1269
 			'symbol'      => 'Ks',
1270 1270
 			'setting'     => array(
1271 1271
 				'currency_position'   => 'before',
@@ -1275,7 +1275,7 @@  discard block
 block discarded – undo
1275 1275
 			),
1276 1276
 		),
1277 1277
 		'MNT' => array(
1278
-			'admin_label' => sprintf( __('Mongolian tögrög (%1$s)', 'give'), '&#x20ae;'),
1278
+			'admin_label' => sprintf(__('Mongolian tögrög (%1$s)', 'give'), '&#x20ae;'),
1279 1279
 			'symbol'      => '&#x20ae;',
1280 1280
 			'setting'     => array(
1281 1281
 				'currency_position'   => 'before',
@@ -1285,7 +1285,7 @@  discard block
 block discarded – undo
1285 1285
 			),
1286 1286
 		),
1287 1287
 		'MOP' => array(
1288
-			'admin_label' => sprintf( __('Macanese pataca (%1$s)', 'give'), 'P'),
1288
+			'admin_label' => sprintf(__('Macanese pataca (%1$s)', 'give'), 'P'),
1289 1289
 			'symbol'      => 'P',
1290 1290
 			'setting'     => array(
1291 1291
 				'currency_position'   => 'before',
@@ -1295,7 +1295,7 @@  discard block
 block discarded – undo
1295 1295
 			),
1296 1296
 		),
1297 1297
 		'MRO' => array(
1298
-			'admin_label' => sprintf( __('Mauritanian ouguiya (%1$s)', 'give'), 'UM'),
1298
+			'admin_label' => sprintf(__('Mauritanian ouguiya (%1$s)', 'give'), 'UM'),
1299 1299
 			'symbol'      => 'UM',
1300 1300
 			'setting'     => array(
1301 1301
 				'currency_position'   => 'after',
@@ -1305,7 +1305,7 @@  discard block
 block discarded – undo
1305 1305
 			),
1306 1306
 		),
1307 1307
 		'MUR' => array(
1308
-			'admin_label' => sprintf( __('Mauritian rupee (%1$s)', 'give'), '&#x20a8;'),
1308
+			'admin_label' => sprintf(__('Mauritian rupee (%1$s)', 'give'), '&#x20a8;'),
1309 1309
 			'symbol'      => '&#x20a8;',
1310 1310
 			'setting'     => array(
1311 1311
 				'currency_position'   => 'before',
@@ -1315,7 +1315,7 @@  discard block
 block discarded – undo
1315 1315
 			),
1316 1316
 		),
1317 1317
 		'MVR' => array(
1318
-			'admin_label' => sprintf( __('Maldivian rufiyaa (%1$s)', 'give'), '.&#x783;'),
1318
+			'admin_label' => sprintf(__('Maldivian rufiyaa (%1$s)', 'give'), '.&#x783;'),
1319 1319
 			'symbol'      => '.&#x783;',
1320 1320
 			'setting'     => array(
1321 1321
 				'currency_position'   => 'after',
@@ -1325,7 +1325,7 @@  discard block
 block discarded – undo
1325 1325
 			),
1326 1326
 		),
1327 1327
 		'MWK' => array(
1328
-			'admin_label' => sprintf( __('Malawian kwacha (%1$s)', 'give'), 'MK'),
1328
+			'admin_label' => sprintf(__('Malawian kwacha (%1$s)', 'give'), 'MK'),
1329 1329
 			'symbol'      => 'MK',
1330 1330
 			'setting'     => array(
1331 1331
 				'currency_position'   => 'before',
@@ -1335,7 +1335,7 @@  discard block
 block discarded – undo
1335 1335
 			),
1336 1336
 		),
1337 1337
 		'MZN' => array(
1338
-			'admin_label' => sprintf( __('Mozambican metical (%1$s)', 'give'), 'MT'),
1338
+			'admin_label' => sprintf(__('Mozambican metical (%1$s)', 'give'), 'MT'),
1339 1339
 			'symbol'      => 'MT',
1340 1340
 			'setting'     => array(
1341 1341
 				'currency_position'   => 'before',
@@ -1345,7 +1345,7 @@  discard block
 block discarded – undo
1345 1345
 			),
1346 1346
 		),
1347 1347
 		'NAD' => array(
1348
-			'admin_label' => sprintf( __('Namibian dollar (%1$s)', 'give'), '&#36;'),
1348
+			'admin_label' => sprintf(__('Namibian dollar (%1$s)', 'give'), '&#36;'),
1349 1349
 			'symbol'      => '&#36;',
1350 1350
 			'setting'     => array(
1351 1351
 				'currency_position'   => 'before',
@@ -1355,7 +1355,7 @@  discard block
 block discarded – undo
1355 1355
 			),
1356 1356
 		),
1357 1357
 		'NGN' => array(
1358
-			'admin_label' => sprintf( __('Nigerian naira (%1$s)', 'give'), '&#8358;'),
1358
+			'admin_label' => sprintf(__('Nigerian naira (%1$s)', 'give'), '&#8358;'),
1359 1359
 			'symbol'      => '&#8358;',
1360 1360
 			'setting'     => array(
1361 1361
 				'currency_position'   => 'before',
@@ -1365,7 +1365,7 @@  discard block
 block discarded – undo
1365 1365
 			),
1366 1366
 		),
1367 1367
 		'NIO' => array(
1368
-			'admin_label' => sprintf( __('Nicaraguan córdoba (%1$s)', 'give'), 'C&#36;'),
1368
+			'admin_label' => sprintf(__('Nicaraguan córdoba (%1$s)', 'give'), 'C&#36;'),
1369 1369
 			'symbol'      => 'C&#36;',
1370 1370
 			'setting'     => array(
1371 1371
 				'currency_position'   => 'before',
@@ -1375,7 +1375,7 @@  discard block
 block discarded – undo
1375 1375
 			),
1376 1376
 		),
1377 1377
 		'PAB' => array(
1378
-			'admin_label' => sprintf( __('Panamanian balboa (%1$s)', 'give'), 'B/.'),
1378
+			'admin_label' => sprintf(__('Panamanian balboa (%1$s)', 'give'), 'B/.'),
1379 1379
 			'symbol'      => 'B/.',
1380 1380
 			'setting'     => array(
1381 1381
 				'currency_position'   => 'before',
@@ -1385,7 +1385,7 @@  discard block
 block discarded – undo
1385 1385
 			),
1386 1386
 		),
1387 1387
 		'PGK' => array(
1388
-			'admin_label' => sprintf( __('Papua New Guinean kina (%1$s)', 'give'), 'K'),
1388
+			'admin_label' => sprintf(__('Papua New Guinean kina (%1$s)', 'give'), 'K'),
1389 1389
 			'symbol'      => 'K',
1390 1390
 			'setting'     => array(
1391 1391
 				'currency_position'   => 'before',
@@ -1395,7 +1395,7 @@  discard block
 block discarded – undo
1395 1395
 			),
1396 1396
 		),
1397 1397
 		'PRB' => array(
1398
-			'admin_label' => sprintf( __('Transnistrian ruble (%1$s)', 'give'), '&#x440;.'),
1398
+			'admin_label' => sprintf(__('Transnistrian ruble (%1$s)', 'give'), '&#x440;.'),
1399 1399
 			'symbol'      => '&#x440;.',
1400 1400
 			'setting'     => array(
1401 1401
 				'currency_position'   => 'before',
@@ -1405,7 +1405,7 @@  discard block
 block discarded – undo
1405 1405
 			),
1406 1406
 		),
1407 1407
 		'PYG' => array(
1408
-			'admin_label' => sprintf( __('Paraguayan guaraní (%1$s)', 'give'), '&#8370;'),
1408
+			'admin_label' => sprintf(__('Paraguayan guaraní (%1$s)', 'give'), '&#8370;'),
1409 1409
 			'symbol'      => '&#8370;',
1410 1410
 			'setting'     => array(
1411 1411
 				'currency_position'   => 'before',
@@ -1415,7 +1415,7 @@  discard block
 block discarded – undo
1415 1415
 			),
1416 1416
 		),
1417 1417
 		'QAR' => array(
1418
-			'admin_label' => sprintf( __('Qatari riyal (%1$s)', 'give'), '&#x631;.&#x642;'),
1418
+			'admin_label' => sprintf(__('Qatari riyal (%1$s)', 'give'), '&#x631;.&#x642;'),
1419 1419
 			'symbol'      => '&#x631;.&#x642;',
1420 1420
 			'setting'     => array(
1421 1421
 				'currency_position'   => 'before',
@@ -1425,7 +1425,7 @@  discard block
 block discarded – undo
1425 1425
 			),
1426 1426
 		),
1427 1427
 		'RSD' => array(
1428
-			'admin_label' => sprintf( __('Serbian dinar (%1$s)', 'give'), '&#x434;&#x438;&#x43d;.'),
1428
+			'admin_label' => sprintf(__('Serbian dinar (%1$s)', 'give'), '&#x434;&#x438;&#x43d;.'),
1429 1429
 			'symbol'      => '&#x434;&#x438;&#x43d;.',
1430 1430
 			'setting'     => array(
1431 1431
 				'currency_position'   => 'after',
@@ -1435,7 +1435,7 @@  discard block
 block discarded – undo
1435 1435
 			),
1436 1436
 		),
1437 1437
 		'RWF' => array(
1438
-			'admin_label' => sprintf( __('Rwandan franc (%1$s)', 'give'), 'Fr'),
1438
+			'admin_label' => sprintf(__('Rwandan franc (%1$s)', 'give'), 'Fr'),
1439 1439
 			'symbol'      => 'Fr',
1440 1440
 			'setting'     => array(
1441 1441
 				'currency_position'   => 'before',
@@ -1445,7 +1445,7 @@  discard block
 block discarded – undo
1445 1445
 			),
1446 1446
 		),
1447 1447
 		'SBD' => array(
1448
-			'admin_label' => sprintf( __('Solomon Islands dollar (%1$s)', 'give'), '&#36;'),
1448
+			'admin_label' => sprintf(__('Solomon Islands dollar (%1$s)', 'give'), '&#36;'),
1449 1449
 			'symbol'      => '&#36;',
1450 1450
 			'setting'     => array(
1451 1451
 				'currency_position'   => 'before',
@@ -1455,7 +1455,7 @@  discard block
 block discarded – undo
1455 1455
 			),
1456 1456
 		),
1457 1457
 		'SCR' => array(
1458
-			'admin_label' => sprintf( __('Seychellois rupee (%1$s)', 'give'), '&#x20a8;'),
1458
+			'admin_label' => sprintf(__('Seychellois rupee (%1$s)', 'give'), '&#x20a8;'),
1459 1459
 			'symbol'      => '&#x20a8;',
1460 1460
 			'setting'     => array(
1461 1461
 				'currency_position'   => 'before',
@@ -1465,7 +1465,7 @@  discard block
 block discarded – undo
1465 1465
 			),
1466 1466
 		),
1467 1467
 		'SDG' => array(
1468
-			'admin_label' => sprintf( __('Sudanese pound (%1$s)', 'give'), '&#x62c;.&#x633;.'),
1468
+			'admin_label' => sprintf(__('Sudanese pound (%1$s)', 'give'), '&#x62c;.&#x633;.'),
1469 1469
 			'symbol'      => '&#x62c;.&#x633;.',
1470 1470
 			'setting'     => array(
1471 1471
 				'currency_position'   => 'before',
@@ -1475,7 +1475,7 @@  discard block
 block discarded – undo
1475 1475
 			),
1476 1476
 		),
1477 1477
 		'SHP' => array(
1478
-			'admin_label' => sprintf( __('Saint Helena pound (%1$s)', 'give'), '&pound;'),
1478
+			'admin_label' => sprintf(__('Saint Helena pound (%1$s)', 'give'), '&pound;'),
1479 1479
 			'symbol'      => '&pound;',
1480 1480
 			'setting'     => array(
1481 1481
 				'currency_position'   => 'before',
@@ -1485,7 +1485,7 @@  discard block
 block discarded – undo
1485 1485
 			),
1486 1486
 		),
1487 1487
 		'SLL' => array(
1488
-			'admin_label' => sprintf( __('Sierra Leonean leone (%1$s)', 'give'), 'Le'),
1488
+			'admin_label' => sprintf(__('Sierra Leonean leone (%1$s)', 'give'), 'Le'),
1489 1489
 			'symbol'      => 'Le',
1490 1490
 			'setting'     => array(
1491 1491
 				'currency_position'   => 'before',
@@ -1495,7 +1495,7 @@  discard block
 block discarded – undo
1495 1495
 			),
1496 1496
 		),
1497 1497
 		'SOS' => array(
1498
-			'admin_label' => sprintf( __('Somali shilling (%1$s)', 'give'), 'Sh'),
1498
+			'admin_label' => sprintf(__('Somali shilling (%1$s)', 'give'), 'Sh'),
1499 1499
 			'symbol'      => 'Sh',
1500 1500
 			'setting'     => array(
1501 1501
 				'currency_position'   => 'before',
@@ -1505,7 +1505,7 @@  discard block
 block discarded – undo
1505 1505
 			),
1506 1506
 		),
1507 1507
 		'SRD' => array(
1508
-			'admin_label' => sprintf( __('Surinamese dollar (%1$s)', 'give'), '&#36;'),
1508
+			'admin_label' => sprintf(__('Surinamese dollar (%1$s)', 'give'), '&#36;'),
1509 1509
 			'symbol'      => '&#36;',
1510 1510
 			'setting'     => array(
1511 1511
 				'currency_position'   => 'before',
@@ -1515,7 +1515,7 @@  discard block
 block discarded – undo
1515 1515
 			),
1516 1516
 		),
1517 1517
 		'SSP' => array(
1518
-			'admin_label' => sprintf( __('South Sudanese pound (%1$s)', 'give'), '&pound;'),
1518
+			'admin_label' => sprintf(__('South Sudanese pound (%1$s)', 'give'), '&pound;'),
1519 1519
 			'symbol'      => '&pound;',
1520 1520
 			'setting'     => array(
1521 1521
 				'currency_position'   => 'before',
@@ -1525,7 +1525,7 @@  discard block
 block discarded – undo
1525 1525
 			),
1526 1526
 		),
1527 1527
 		'STD' => array(
1528
-			'admin_label' => sprintf( __('São Tomé and Príncipe dobra (%1$s)', 'give'), 'Db'),
1528
+			'admin_label' => sprintf(__('São Tomé and Príncipe dobra (%1$s)', 'give'), 'Db'),
1529 1529
 			'symbol'      => 'Db',
1530 1530
 			'setting'     => array(
1531 1531
 				'currency_position'   => 'before',
@@ -1535,7 +1535,7 @@  discard block
 block discarded – undo
1535 1535
 			),
1536 1536
 		),
1537 1537
 		'SYP' => array(
1538
-			'admin_label' => sprintf( __('Syrian pound (%1$s)', 'give'), '&#x644;.&#x633;'),
1538
+			'admin_label' => sprintf(__('Syrian pound (%1$s)', 'give'), '&#x644;.&#x633;'),
1539 1539
 			'symbol'      => '&#x644;.&#x633;',
1540 1540
 			'setting'     => array(
1541 1541
 				'currency_position'   => 'before',
@@ -1545,7 +1545,7 @@  discard block
 block discarded – undo
1545 1545
 			),
1546 1546
 		),
1547 1547
 		'TJS' => array(
1548
-			'admin_label' => sprintf( __('Tajikistani somoni (%1$s)', 'give'), '&#x405;&#x41c;'),
1548
+			'admin_label' => sprintf(__('Tajikistani somoni (%1$s)', 'give'), '&#x405;&#x41c;'),
1549 1549
 			'symbol'      => '&#x405;&#x41c;',
1550 1550
 			'setting'     => array(
1551 1551
 				'currency_position'   => 'after',
@@ -1555,7 +1555,7 @@  discard block
 block discarded – undo
1555 1555
 			),
1556 1556
 		),
1557 1557
 		'TMT' => array(
1558
-			'admin_label' => sprintf( __('Turkmenistan manat (%1$s)', 'give'), 'm'),
1558
+			'admin_label' => sprintf(__('Turkmenistan manat (%1$s)', 'give'), 'm'),
1559 1559
 			'symbol'      => 'm',
1560 1560
 			'setting'     => array(
1561 1561
 				'currency_position'   => 'after',
@@ -1565,7 +1565,7 @@  discard block
 block discarded – undo
1565 1565
 			),
1566 1566
 		),
1567 1567
 		'TND' => array(
1568
-			'admin_label' => sprintf( __('Turkmenistan manat (%1$s)', 'give'), '&#x62f;.&#x62a;'),
1568
+			'admin_label' => sprintf(__('Turkmenistan manat (%1$s)', 'give'), '&#x62f;.&#x62a;'),
1569 1569
 			'symbol'      => '&#x62f;.&#x62a;',
1570 1570
 			'setting'     => array(
1571 1571
 				'currency_position'   => 'before',
@@ -1575,7 +1575,7 @@  discard block
 block discarded – undo
1575 1575
 			),
1576 1576
 		),
1577 1577
 		'TTD' => array(
1578
-			'admin_label' => sprintf( __('Trinidad and Tobago dollar (%1$s)', 'give'), '&#36;'),
1578
+			'admin_label' => sprintf(__('Trinidad and Tobago dollar (%1$s)', 'give'), '&#36;'),
1579 1579
 			'symbol'      => '&#36;',
1580 1580
 			'setting'     => array(
1581 1581
 				'currency_position'   => 'before',
@@ -1585,7 +1585,7 @@  discard block
 block discarded – undo
1585 1585
 			),
1586 1586
 		),
1587 1587
 		'UGX' => array(
1588
-			'admin_label' => sprintf( __('Ugandan shilling (%1$s)', 'give'), 'UGX'),
1588
+			'admin_label' => sprintf(__('Ugandan shilling (%1$s)', 'give'), 'UGX'),
1589 1589
 			'symbol'      => 'UGX',
1590 1590
 			'setting'     => array(
1591 1591
 				'currency_position'   => 'before',
@@ -1595,7 +1595,7 @@  discard block
 block discarded – undo
1595 1595
 			),
1596 1596
 		),
1597 1597
 		'UZS' => array(
1598
-			'admin_label' => sprintf( __('Uzbekistani som (%1$s)', 'give'), 'UZS'),
1598
+			'admin_label' => sprintf(__('Uzbekistani som (%1$s)', 'give'), 'UZS'),
1599 1599
 			'symbol'      => 'UZS',
1600 1600
 			'setting'     => array(
1601 1601
 				'currency_position'   => 'after',
@@ -1605,7 +1605,7 @@  discard block
 block discarded – undo
1605 1605
 			),
1606 1606
 		),
1607 1607
 		'VND' => array(
1608
-			'admin_label' => sprintf( __('Vietnamese đồng (%1$s)', 'give'), '&#8363;'),
1608
+			'admin_label' => sprintf(__('Vietnamese đồng (%1$s)', 'give'), '&#8363;'),
1609 1609
 			'symbol'      => '&#8363;',
1610 1610
 			'setting'     => array(
1611 1611
 				'currency_position'   => 'after',
@@ -1615,7 +1615,7 @@  discard block
 block discarded – undo
1615 1615
 			),
1616 1616
 		),
1617 1617
 		'VUV' => array(
1618
-			'admin_label' => sprintf( __('Vanuatu vatu (%1$s)', 'give'), 'Vt'),
1618
+			'admin_label' => sprintf(__('Vanuatu vatu (%1$s)', 'give'), 'Vt'),
1619 1619
 			'symbol'      => 'Vt',
1620 1620
 			'setting'     => array(
1621 1621
 				'currency_position'   => 'after',
@@ -1625,7 +1625,7 @@  discard block
 block discarded – undo
1625 1625
 			),
1626 1626
 		),
1627 1627
 		'WST' => array(
1628
-			'admin_label' => sprintf( __('Samoan tālā (%1$s)', 'give'), 'T'),
1628
+			'admin_label' => sprintf(__('Samoan tālā (%1$s)', 'give'), 'T'),
1629 1629
 			'symbol'      => 'T',
1630 1630
 			'setting'     => array(
1631 1631
 				'currency_position'   => 'before',
@@ -1635,7 +1635,7 @@  discard block
 block discarded – undo
1635 1635
 			),
1636 1636
 		),
1637 1637
 		'XAF' => array(
1638
-			'admin_label' => sprintf( __('Central African CFA franc (%1$s)', 'give'), 'CFA'),
1638
+			'admin_label' => sprintf(__('Central African CFA franc (%1$s)', 'give'), 'CFA'),
1639 1639
 			'symbol'      => 'CFA',
1640 1640
 			'setting'     => array(
1641 1641
 				'currency_position'   => 'after',
@@ -1645,7 +1645,7 @@  discard block
 block discarded – undo
1645 1645
 			),
1646 1646
 		),
1647 1647
 		'XOF' => array(
1648
-			'admin_label' => sprintf( __('West African CFA franc (%1$s)', 'give'), 'CFA'),
1648
+			'admin_label' => sprintf(__('West African CFA franc (%1$s)', 'give'), 'CFA'),
1649 1649
 			'symbol'      => 'CFA',
1650 1650
 			'setting'     => array(
1651 1651
 				'currency_position'   => 'after',
@@ -1655,7 +1655,7 @@  discard block
 block discarded – undo
1655 1655
 			),
1656 1656
 		),
1657 1657
 		'XPF' => array(
1658
-			'admin_label' => sprintf( __('CFP franc (%1$s)', 'give'), 'Fr'),
1658
+			'admin_label' => sprintf(__('CFP franc (%1$s)', 'give'), 'Fr'),
1659 1659
 			'symbol'      => 'Fr',
1660 1660
 			'setting'     => array(
1661 1661
 				'currency_position'   => 'after',
@@ -1665,7 +1665,7 @@  discard block
 block discarded – undo
1665 1665
 			),
1666 1666
 		),
1667 1667
 		'YER' => array(
1668
-			'admin_label' => sprintf( __('Yemeni rial (%1$s)', 'give'), '&#xfdfc;'),
1668
+			'admin_label' => sprintf(__('Yemeni rial (%1$s)', 'give'), '&#xfdfc;'),
1669 1669
 			'symbol'      => '&#xfdfc;',
1670 1670
 			'setting'     => array(
1671 1671
 				'currency_position'   => 'before',
@@ -1675,7 +1675,7 @@  discard block
 block discarded – undo
1675 1675
 			),
1676 1676
 		),
1677 1677
 		'ZMW' => array(
1678
-			'admin_label' => sprintf( __('Zambian kwacha (%1$s)', 'give'), 'ZK'),
1678
+			'admin_label' => sprintf(__('Zambian kwacha (%1$s)', 'give'), 'ZK'),
1679 1679
 			'symbol'      => 'ZK',
1680 1680
 			'setting'     => array(
1681 1681
 				'currency_position'   => 'before',
@@ -1700,7 +1700,7 @@  discard block
 block discarded – undo
1700 1700
 	 *
1701 1701
 	 * @param array $currencies
1702 1702
 	 */
1703
-	return (array) apply_filters( 'give_currencies', $currencies );
1703
+	return (array) apply_filters('give_currencies', $currencies);
1704 1704
 }
1705 1705
 
1706 1706
 /**
@@ -1712,22 +1712,22 @@  discard block
 block discarded – undo
1712 1712
  *
1713 1713
  * @return array $currencies A list of the available currencies
1714 1714
  */
1715
-function give_get_currencies( $info = 'admin_label' ) {
1715
+function give_get_currencies($info = 'admin_label') {
1716 1716
 
1717 1717
 	$currencies = give_get_currencies_list();
1718 1718
 
1719 1719
 	// Backward compatibility: handle old way of currency registration.
1720 1720
 	// Backward compatibility: Return desired result.
1721
-	if ( ! empty( $currencies ) ) {
1722
-		foreach ( $currencies as $currency_code => $currency_setting ) {
1723
-			if ( is_string( $currency_setting ) ) {
1724
-				$currencies[ $currency_code ] = array(
1721
+	if ( ! empty($currencies)) {
1722
+		foreach ($currencies as $currency_code => $currency_setting) {
1723
+			if (is_string($currency_setting)) {
1724
+				$currencies[$currency_code] = array(
1725 1725
 					'admin_label' => $currency_setting,
1726 1726
 				);
1727 1727
 			}
1728 1728
 
1729
-			$currencies[ $currency_code ] = wp_parse_args(
1730
-				$currencies[ $currency_code ],
1729
+			$currencies[$currency_code] = wp_parse_args(
1730
+				$currencies[$currency_code],
1731 1731
 				array(
1732 1732
 					'admin_label' => '',
1733 1733
 					'symbol'      => $currency_code,
@@ -1736,8 +1736,8 @@  discard block
 block discarded – undo
1736 1736
 			);
1737 1737
 		}
1738 1738
 
1739
-		if ( ! empty( $info ) && is_string( $info ) && 'all' !== $info ) {
1740
-			$currencies = wp_list_pluck( $currencies, $info );
1739
+		if ( ! empty($info) && is_string($info) && 'all' !== $info) {
1740
+			$currencies = wp_list_pluck($currencies, $info);
1741 1741
 		}
1742 1742
 	}
1743 1743
 
@@ -1754,12 +1754,12 @@  discard block
 block discarded – undo
1754 1754
  *
1755 1755
  * @return array
1756 1756
  */
1757
-function give_currency_symbols( $decode_currencies = false ) {
1758
-	$currencies = give_get_currencies( 'symbol' );
1757
+function give_currency_symbols($decode_currencies = false) {
1758
+	$currencies = give_get_currencies('symbol');
1759 1759
 
1760
-	if ( $decode_currencies ) {
1761
-		array_walk( $currencies, function ( &$currency_symbol ) {
1762
-			$currency_symbol = html_entity_decode( $currency_symbol, ENT_COMPAT, 'UTF-8' );
1760
+	if ($decode_currencies) {
1761
+		array_walk($currencies, function(&$currency_symbol) {
1762
+			$currency_symbol = html_entity_decode($currency_symbol, ENT_COMPAT, 'UTF-8');
1763 1763
 		} );
1764 1764
 	}
1765 1765
 
@@ -1770,7 +1770,7 @@  discard block
 block discarded – undo
1770 1770
 	 *
1771 1771
 	 * @param array $currencies
1772 1772
 	 */
1773
-	return apply_filters( 'give_currency_symbols', $currencies );
1773
+	return apply_filters('give_currency_symbols', $currencies);
1774 1774
 }
1775 1775
 
1776 1776
 
@@ -1787,14 +1787,14 @@  discard block
 block discarded – undo
1787 1787
  *
1788 1788
  * @return string           The symbol to use for the currency
1789 1789
  */
1790
-function give_currency_symbol( $currency = '', $decode_currency = false ) {
1790
+function give_currency_symbol($currency = '', $decode_currency = false) {
1791 1791
 
1792
-	if ( empty( $currency ) ) {
1792
+	if (empty($currency)) {
1793 1793
 		$currency = give_get_currency();
1794 1794
 	}
1795 1795
 
1796
-	$currencies = give_currency_symbols( $decode_currency );
1797
-	$symbol     = array_key_exists( $currency, $currencies ) ? $currencies[ $currency ] : $currency;
1796
+	$currencies = give_currency_symbols($decode_currency);
1797
+	$symbol     = array_key_exists($currency, $currencies) ? $currencies[$currency] : $currency;
1798 1798
 
1799 1799
 	/**
1800 1800
 	 * Filter the currency symbol
@@ -1804,7 +1804,7 @@  discard block
 block discarded – undo
1804 1804
 	 * @param string $symbol
1805 1805
 	 * @param string $currency
1806 1806
 	 */
1807
-	return apply_filters( 'give_currency_symbol', $symbol, $currency );
1807
+	return apply_filters('give_currency_symbol', $symbol, $currency);
1808 1808
 }
1809 1809
 
1810 1810
 
@@ -1817,13 +1817,13 @@  discard block
 block discarded – undo
1817 1817
  *
1818 1818
  * @return string
1819 1819
  */
1820
-function give_get_currency_name( $currency_code ) {
1820
+function give_get_currency_name($currency_code) {
1821 1821
 	$currency_name  = '';
1822 1822
 	$currency_names = give_get_currencies();
1823 1823
 
1824
-	if ( $currency_code && array_key_exists( $currency_code, $currency_names ) ) {
1825
-		$currency_name = explode( '(', $currency_names[ $currency_code ] );
1826
-		$currency_name = trim( current( $currency_name ) );
1824
+	if ($currency_code && array_key_exists($currency_code, $currency_names)) {
1825
+		$currency_name = explode('(', $currency_names[$currency_code]);
1826
+		$currency_name = trim(current($currency_name));
1827 1827
 	}
1828 1828
 
1829 1829
 	/**
@@ -1834,7 +1834,7 @@  discard block
 block discarded – undo
1834 1834
 	 * @param string $currency_name
1835 1835
 	 * @param string $currency_code
1836 1836
 	 */
1837
-	return apply_filters( 'give_currency_name', $currency_name, $currency_code );
1837
+	return apply_filters('give_currency_name', $currency_name, $currency_code);
1838 1838
 }
1839 1839
 
1840 1840
 /**
@@ -1847,20 +1847,20 @@  discard block
 block discarded – undo
1847 1847
  *
1848 1848
  * @return mixed|string
1849 1849
  */
1850
-function give_currency_filter( $price = '', $args = array() ) {
1850
+function give_currency_filter($price = '', $args = array()) {
1851 1851
 
1852 1852
 	// Get functions arguments.
1853 1853
 	$func_args = func_get_args();
1854 1854
 
1855 1855
 	// Backward compatibility: modify second param to array
1856
-	if ( isset( $func_args[1] ) && is_string( $func_args[1] ) ) {
1856
+	if (isset($func_args[1]) && is_string($func_args[1])) {
1857 1857
 		$args = array(
1858
-			'currency_code'   => isset( $func_args[1] ) ? $func_args[1] : '',
1859
-			'decode_currency' => isset( $func_args[2] ) ? $func_args[2] : false,
1860
-			'form_id'         => isset( $func_args[3] ) ? $func_args[3] : '',
1858
+			'currency_code'   => isset($func_args[1]) ? $func_args[1] : '',
1859
+			'decode_currency' => isset($func_args[2]) ? $func_args[2] : false,
1860
+			'form_id'         => isset($func_args[3]) ? $func_args[3] : '',
1861 1861
 		);
1862 1862
 
1863
-		give_doing_it_wrong( __FUNCTION__, 'Pass second argument as Array.', GIVE_VERSION );
1863
+		give_doing_it_wrong(__FUNCTION__, 'Pass second argument as Array.', GIVE_VERSION);
1864 1864
 	}
1865 1865
 
1866 1866
 	// Set default values.
@@ -1873,22 +1873,22 @@  discard block
 block discarded – undo
1873 1873
 		)
1874 1874
 	);
1875 1875
 
1876
-	if ( empty( $args['currency_code'] ) || ! array_key_exists( (string) $args['currency_code'], give_get_currencies() ) ) {
1877
-		$args['currency_code'] = give_get_currency( $args['form_id'] );
1876
+	if (empty($args['currency_code']) || ! array_key_exists((string) $args['currency_code'], give_get_currencies())) {
1877
+		$args['currency_code'] = give_get_currency($args['form_id']);
1878 1878
 	}
1879 1879
 
1880
-	$args['position'] = give_get_option( 'currency_position', 'before' );
1880
+	$args['position'] = give_get_option('currency_position', 'before');
1881 1881
 
1882 1882
 	$negative = $price < 0;
1883 1883
 
1884
-	if ( $negative ) {
1884
+	if ($negative) {
1885 1885
 		// Remove proceeding "-".
1886
-		$price = substr( $price, 1 );
1886
+		$price = substr($price, 1);
1887 1887
 	}
1888 1888
 
1889
-	$args['symbol'] = give_currency_symbol( $args['currency_code'], $args['decode_currency'] );
1889
+	$args['symbol'] = give_currency_symbol($args['currency_code'], $args['decode_currency']);
1890 1890
 
1891
-	switch ( $args['currency_code'] ) :
1891
+	switch ($args['currency_code']) :
1892 1892
 		case 'GBP' :
1893 1893
 		case 'BRL' :
1894 1894
 		case 'EUR' :
@@ -1918,13 +1918,13 @@  discard block
 block discarded – undo
1918 1918
 		case 'MAD' :
1919 1919
 		case 'KRW' :
1920 1920
 		case 'ZAR' :
1921
-			$formatted = ( 'before' === $args['position'] ? $args['symbol'] . $price : $price . $args['symbol'] );
1921
+			$formatted = ('before' === $args['position'] ? $args['symbol'].$price : $price.$args['symbol']);
1922 1922
 			break;
1923 1923
 		case 'NOK':
1924
-			$formatted = ( 'before' === $args['position'] ? $args['symbol'] . ' ' . $price : $price . ' ' . $args['symbol'] );
1924
+			$formatted = ('before' === $args['position'] ? $args['symbol'].' '.$price : $price.' '.$args['symbol']);
1925 1925
 			break;
1926 1926
 		default:
1927
-			$formatted = ( 'before' === $args['position'] ? $args['symbol'] . ' ' . $price : $price . ' ' . $args['symbol'] );
1927
+			$formatted = ('before' === $args['position'] ? $args['symbol'].' '.$price : $price.' '.$args['symbol']);
1928 1928
 			break;
1929 1929
 	endswitch;
1930 1930
 
@@ -1933,7 +1933,7 @@  discard block
 block discarded – undo
1933 1933
 	 *
1934 1934
 	 * @since 1.8.17
1935 1935
 	 */
1936
-	$formatted = apply_filters( 'give_currency_filter', $formatted, $args, $price );
1936
+	$formatted = apply_filters('give_currency_filter', $formatted, $args, $price);
1937 1937
 
1938 1938
 	/**
1939 1939
 	 * Filter formatted amount with currency
@@ -1947,16 +1947,16 @@  discard block
 block discarded – undo
1947 1947
 	 *           filter name will be give_usd_currency_filter_after
1948 1948
 	 */
1949 1949
 	$formatted = apply_filters(
1950
-		'give_' . strtolower( $args['currency_code'] ) . "_currency_filter_{$args['position']}",
1950
+		'give_'.strtolower($args['currency_code'])."_currency_filter_{$args['position']}",
1951 1951
 		$formatted,
1952 1952
 		$args['currency_code'],
1953 1953
 		$price,
1954 1954
 		$args
1955 1955
 	);
1956 1956
 
1957
-	if ( $negative ) {
1957
+	if ($negative) {
1958 1958
 		// Prepend the minus sign before the currency sign.
1959
-		$formatted = '-' . $formatted;
1959
+		$formatted = '-'.$formatted;
1960 1960
 	}
1961 1961
 
1962 1962
 	return $formatted;
@@ -1974,7 +1974,7 @@  discard block
 block discarded – undo
1974 1974
  *
1975 1975
  * @return bool
1976 1976
  */
1977
-function give_is_zero_based_currency( $currency = '' ) {
1977
+function give_is_zero_based_currency($currency = '') {
1978 1978
 	$zero_based_currency = array(
1979 1979
 		'JPY', // Japanese Yen.
1980 1980
 		'KRW', // South Korean Won.
@@ -1994,12 +1994,12 @@  discard block
 block discarded – undo
1994 1994
 	);
1995 1995
 
1996 1996
 	// Set default currency.
1997
-	if ( empty( $currency ) ) {
1997
+	if (empty($currency)) {
1998 1998
 		$currency = give_get_currency();
1999 1999
 	}
2000 2000
 
2001 2001
 	// Check for Zero Based Currency.
2002
-	if ( in_array( $currency, $zero_based_currency ) ) {
2002
+	if (in_array($currency, $zero_based_currency)) {
2003 2003
 		return true;
2004 2004
 	}
2005 2005
 
@@ -2014,7 +2014,7 @@  discard block
 block discarded – undo
2014 2014
  *
2015 2015
  * @return bool
2016 2016
  */
2017
-function give_is_right_to_left_supported_currency( $currency = '' ) {
2017
+function give_is_right_to_left_supported_currency($currency = '') {
2018 2018
 	$zero_based_currency = apply_filters(
2019 2019
 		'give_right_to_left_supported_currency',
2020 2020
 		array(
@@ -2038,12 +2038,12 @@  discard block
 block discarded – undo
2038 2038
 	);
2039 2039
 
2040 2040
 	// Set default currency.
2041
-	if ( empty( $currency ) ) {
2041
+	if (empty($currency)) {
2042 2042
 		$currency = give_get_currency();
2043 2043
 	}
2044 2044
 
2045 2045
 	// Check for Zero Based Currency.
2046
-	if ( in_array( $currency, $zero_based_currency ) ) {
2046
+	if (in_array($currency, $zero_based_currency)) {
2047 2047
 		return true;
2048 2048
 	}
2049 2049
 
Please login to merge, or discard this patch.
includes/donors/class-give-donor-wall.php 1 patch
Spacing   +39 added lines, -39 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
 
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
 	 * @return Give_Donor_Wall
51 51
 	 */
52 52
 	public static function get_instance() {
53
-		if ( null === static::$instance ) {
53
+		if (null === static::$instance) {
54 54
 			self::$instance = new static();
55 55
 
56 56
 			self::$instance->setup_actions();
@@ -68,10 +68,10 @@  discard block
 block discarded – undo
68 68
 	 */
69 69
 	public function setup_actions() {
70 70
 
71
-		add_shortcode( 'give_donor_wall', array( $this, 'render_shortcode' ) );
71
+		add_shortcode('give_donor_wall', array($this, 'render_shortcode'));
72 72
 
73
-		add_action( 'wp_ajax_give_get_donor_comments', array( $this, 'ajax_handler' ) );
74
-		add_action( 'wp_ajax_nopriv_give_get_donor_comments', array( $this, 'ajax_handler' ) );
73
+		add_action('wp_ajax_give_get_donor_comments', array($this, 'ajax_handler'));
74
+		add_action('wp_ajax_nopriv_give_get_donor_comments', array($this, 'ajax_handler'));
75 75
 
76 76
 	}
77 77
 
@@ -107,29 +107,29 @@  discard block
 block discarded – undo
107 107
 	 * }
108 108
 	 * @return string|bool The markup of the form grid or false.
109 109
 	 */
110
-	public function render_shortcode( $atts ) {
110
+	public function render_shortcode($atts) {
111 111
 
112 112
 		$give_settings = give_get_settings();
113 113
 
114
-		$atts        = $this->parse_atts( $atts );
115
-		$donor_query = $this->get_donor_query_atts( $atts );
116
-		$donors      = $this->get_donors( $donor_query );
114
+		$atts        = $this->parse_atts($atts);
115
+		$donor_query = $this->get_donor_query_atts($atts);
116
+		$donors      = $this->get_donors($donor_query);
117 117
 		$html        = '';
118 118
 
119
-		if ( $donors ) {
119
+		if ($donors) {
120 120
 
121 121
 			ob_start();
122 122
 
123
-			foreach ( $donors as $donor ) {
123
+			foreach ($donors as $donor) {
124 124
 				// Give/templates/shortcode-donor-wall.php.
125
-				give_get_template( 'shortcode-donor-wall', array( $donor, $give_settings, $atts ) );
125
+				give_get_template('shortcode-donor-wall', array($donor, $give_settings, $atts));
126 126
 			}
127 127
 
128 128
 			$html = ob_get_clean();
129 129
 
130 130
 			// Return only donor html.
131 131
 			if (
132
-				isset( $atts['only_donor_html'] )
132
+				isset($atts['only_donor_html'])
133 133
 				&& wp_doing_ajax()
134 134
 				&& $atts['only_donor_html']
135 135
 			) {
@@ -142,10 +142,10 @@  discard block
 block discarded – undo
142 142
 		$next_donor_query['fields'] = 'id';
143 143
 
144 144
 		$more_btn_html = '';
145
-		if ( $this->get_donors( $next_donor_query ) ) {
145
+		if ($this->get_donors($next_donor_query)) {
146 146
 			$more_btn_html = sprintf(
147 147
 				'<button class="give-donor__load_more give-button-with-loader" data-shortcode="%1$s"><span class="give-loading-animation"></span>%2$s</button>',
148
-				rawurlencode( http_build_query( $atts ) ),
148
+				rawurlencode(http_build_query($atts)),
149 149
 				$atts['loadmore_text']
150 150
 			);
151 151
 		}
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
 		$html = $html
154 154
 			? sprintf(
155 155
 				'<div class="give-wrap"><div class="give-grid give-grid--%1$s">%2$s</div>%3$s</div>',
156
-				esc_attr( $atts['columns'] ),
156
+				esc_attr($atts['columns']),
157 157
 				$html,
158 158
 				$more_btn_html
159 159
 			)
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
 	 *
173 173
 	 * @return array
174 174
 	 */
175
-	public function parse_atts( $atts ) {
175
+	public function parse_atts($atts) {
176 176
 		$atts = shortcode_atts(
177 177
 			array(
178 178
 				'donors_per_page' => 20,
@@ -187,8 +187,8 @@  discard block
 block discarded – undo
187 187
 				'show_comments'   => true,
188 188
 				'comment_length'  => 20,
189 189
 				'only_comments'   => true,
190
-				'readmore_text'   => esc_html__( 'Read More', 'give' ),
191
-				'loadmore_text'   => esc_html__( 'Load More', 'give' ),
190
+				'readmore_text'   => esc_html__('Read More', 'give'),
191
+				'loadmore_text'   => esc_html__('Load More', 'give'),
192 192
 				'avatar_size'     => 60,
193 193
 				'orderby'         => 'donation_count',
194 194
 				'order'           => 'DESC',
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
 		);
199 199
 
200 200
 		// Validate integer attributes.
201
-		$atts['donors_per_page'] = absint( $atts['donors_per_page'] );
201
+		$atts['donors_per_page'] = absint($atts['donors_per_page']);
202 202
 
203 203
 		// Validate boolean attributes.
204 204
 		$boolean_attributes = array(
@@ -213,14 +213,14 @@  discard block
 block discarded – undo
213 213
 			'only_donor_html',
214 214
 		);
215 215
 
216
-		foreach ( $boolean_attributes as $att ) {
216
+		foreach ($boolean_attributes as $att) {
217 217
 			// Convert numeric to boolean.
218 218
 			// It will prevent condition check against boolean value.
219
-			if ( is_numeric( $atts[ $att ] ) ) {
220
-				$atts[ $att ] = (bool) $atts[ $att ];
219
+			if (is_numeric($atts[$att])) {
220
+				$atts[$att] = (bool) $atts[$att];
221 221
 			}
222 222
 
223
-			$atts[ $att ] = filter_var( $atts[ $att ], FILTER_VALIDATE_BOOLEAN );
223
+			$atts[$att] = filter_var($atts[$att], FILTER_VALIDATE_BOOLEAN);
224 224
 		}
225 225
 
226 226
 		return $atts;
@@ -236,7 +236,7 @@  discard block
 block discarded – undo
236 236
 	 *
237 237
 	 * @return array
238 238
 	 */
239
-	public function get_donor_query_atts( $atts ) {
239
+	public function get_donor_query_atts($atts) {
240 240
 		// Set default form query args.
241 241
 		$donor_args = array(
242 242
 			'number'  => $atts['donors_per_page'],
@@ -246,7 +246,7 @@  discard block
 block discarded – undo
246 246
 		);
247 247
 
248 248
 		// Hide donors with zero donation amount.
249
-		if ( $atts['hide_empty'] ) {
249
+		if ($atts['hide_empty']) {
250 250
 			$donor_args['donation_amount'] = array(
251 251
 				'compare' => '>=',
252 252
 				'amount'  => 1,
@@ -254,18 +254,18 @@  discard block
 block discarded – undo
254 254
 		}
255 255
 
256 256
 		// Show donor who donated to specific form.
257
-		if ( $atts['form_id'] ) {
257
+		if ($atts['form_id']) {
258 258
 			$donor_args['give_forms'] = $atts['form_id'];
259 259
 		}
260 260
 
261 261
 		// Show donor by id.
262
-		if ( $atts['ids'] ) {
262
+		if ($atts['ids']) {
263 263
 			$donor_args['donor'] = $atts['ids'];
264 264
 		}
265 265
 
266 266
 		// Replace donation with purchase because donor table has that prefix in column name.
267 267
 		$donor_args['orderby'] = str_replace(
268
-			array( 'donation', 'amount' ), array(
268
+			array('donation', 'amount'), array(
269 269
 				'purchase',
270 270
 				'value',
271 271
 			), $atts['orderby']
@@ -277,11 +277,11 @@  discard block
 block discarded – undo
277 277
 			'date_created'         => 'DESC',
278 278
 		);
279 279
 
280
-		unset( $donor_args['order'] );
280
+		unset($donor_args['order']);
281 281
 
282 282
 		// Set payment query.
283 283
 		// @codingStandardsIgnoreStart
284
-		if ( true === $atts['only_comments'] ) {
284
+		if (true === $atts['only_comments']) {
285 285
 			$donor_args['meta_query'] = array(
286 286
 				array(
287 287
 					'key'   => '_give_has_comment',
@@ -304,8 +304,8 @@  discard block
 block discarded – undo
304 304
 	 *
305 305
 	 * @return array
306 306
 	 */
307
-	public function get_donors( $donor_query ) {
308
-		$donor_query = new Give_Donors_Query( $donor_query );
307
+	public function get_donors($donor_query) {
308
+		$donor_query = new Give_Donors_Query($donor_query);
309 309
 		$donors      = $donor_query->get_donors();
310 310
 
311 311
 		return $donors;
@@ -319,26 +319,26 @@  discard block
 block discarded – undo
319 319
 	 * @access public
320 320
 	 */
321 321
 	public function ajax_handler() {
322
-		$shortcode_atts = wp_parse_args( give_clean( rawurldecode( $_POST['data'] ) ) ); // @codingStandardsIgnoreLine
322
+		$shortcode_atts = wp_parse_args(give_clean(rawurldecode($_POST['data']))); // @codingStandardsIgnoreLine
323 323
 
324 324
 		// Get next page donor comments.
325 325
 		$shortcode_atts['paged']           = $shortcode_atts['paged'] + 1;
326 326
 		$shortcode_atts['only_donor_html'] = true;
327 327
 
328
-		$donors_comment_html = $this->render_shortcode( $shortcode_atts );
328
+		$donors_comment_html = $this->render_shortcode($shortcode_atts);
329 329
 
330 330
 		// Check if donor comment remaining.
331
-		$donor_query           = $this->get_donor_query_atts( $shortcode_atts );
331
+		$donor_query           = $this->get_donor_query_atts($shortcode_atts);
332 332
 		$donor_query['paged']  = $donor_query['paged'] + 1;
333 333
 		$donor_query['fields'] = 'id';
334
-		$has_donors            = $this->get_donors( $donor_query ) ? 1 : 0;
334
+		$has_donors            = $this->get_donors($donor_query) ? 1 : 0;
335 335
 
336 336
 		// Remove internal shortcode param.
337
-		unset( $shortcode_atts['only_donor_html'] );
337
+		unset($shortcode_atts['only_donor_html']);
338 338
 
339 339
 		wp_send_json(
340 340
 			array(
341
-				'shortcode' => rawurlencode( http_build_query( $shortcode_atts ) ),
341
+				'shortcode' => rawurlencode(http_build_query($shortcode_atts)),
342 342
 				'html'      => $donors_comment_html,
343 343
 				'remaining' => $has_donors,
344 344
 			)
Please login to merge, or discard this patch.
includes/donors/class-give-donor-stats.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
 	 * @return Give_Donor_Stats
39 39
 	 */
40 40
 	public static function get_instance() {
41
-		if ( null === static::$instance ) {
41
+		if (null === static::$instance) {
42 42
 			self::$instance = new static();
43 43
 		}
44 44
 
@@ -57,13 +57,13 @@  discard block
 block discarded – undo
57 57
 	 * @return string
58 58
 	 *
59 59
 	 */
60
-	public static function donated( $args = array() ) {
60
+	public static function donated($args = array()) {
61 61
 		global $wpdb;
62
-		$donation_id_col = Give()->payment_meta->get_meta_type() . '_id';
62
+		$donation_id_col = Give()->payment_meta->get_meta_type().'_id';
63 63
 
64 64
 		$donated_amount = '';
65 65
 
66
-		if ( empty( $args['donor'] ) ) {
66
+		if (empty($args['donor'])) {
67 67
 			return $donated_amount;
68 68
 		}
69 69
 
@@ -72,20 +72,20 @@  discard block
 block discarded – undo
72 72
 		$args['fields'] = 'ids';
73 73
 		$args['number'] = - 1;
74 74
 
75
-		$donation_query  = new Give_Payments_Query( $args );
75
+		$donation_query  = new Give_Payments_Query($args);
76 76
 		$donations       = $donation_query->get_payments();
77
-		$donation_id_str = implode( '\',\'', $donations );
77
+		$donation_id_str = implode('\',\'', $donations);
78 78
 
79 79
 		$query = "SELECT {$donation_id_col} as id, meta_value as total
80 80
 					FROM {$wpdb->donationmeta}
81 81
 					WHERE meta_key='_give_payment_total'
82 82
 					AND {$donation_id_col} IN ('{$donation_id_str}')";
83 83
 
84
-		$donated_amounts = $wpdb->get_results( $query, ARRAY_A );
84
+		$donated_amounts = $wpdb->get_results($query, ARRAY_A);
85 85
 
86
-		if ( ! empty( $donated_amounts ) ) {
87
-			foreach ( $donated_amounts as $donation ) {
88
-				$currency_code = give_get_payment_currency_code( $donation['id'] );
86
+		if ( ! empty($donated_amounts)) {
87
+			foreach ($donated_amounts as $donation) {
88
+				$currency_code = give_get_payment_currency_code($donation['id']);
89 89
 				/**
90 90
 				 * Filter the donation amount
91 91
 				 * Note: this filter documented in payments/functions.php:give_donation_amount()
@@ -94,13 +94,13 @@  discard block
 block discarded – undo
94 94
 				 */
95 95
 				$formatted_amount = apply_filters(
96 96
 					'give_donation_amount',
97
-					give_format_amount( $donation['total'], array( 'currency' => $currency_code ) ),
97
+					give_format_amount($donation['total'], array('currency' => $currency_code)),
98 98
 					$donation['total'],
99 99
 					$donation['id'],
100
-					array( 'type' => 'stats', 'currency' => false, 'amount' => false )
100
+					array('type' => 'stats', 'currency' => false, 'amount' => false)
101 101
 				);
102 102
 
103
-				$donated_amount = (float) give_maybe_sanitize_amount( $formatted_amount, array( 'currency' => $currency_code  ) );
103
+				$donated_amount = (float) give_maybe_sanitize_amount($formatted_amount, array('currency' => $currency_code));
104 104
 				$donated_amount += $donated_amount;
105 105
 			}
106 106
 		}
Please login to merge, or discard this patch.
includes/donors/class-give-donors-query.php 1 patch
Spacing   +74 added lines, -74 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
 
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
 	 *
87 87
 	 * @param  $args array The array of arguments that can be passed in and used for setting up this payment query.
88 88
 	 */
89
-	public function __construct( $args = array() ) {
89
+	public function __construct($args = array()) {
90 90
 		$defaults = array(
91 91
 			'number'          => 20,
92 92
 			'offset'          => 0,
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
 			// 'form'       => array(),
117 117
 		);
118 118
 
119
-		$this->args            = wp_parse_args( $args, $defaults );
119
+		$this->args            = wp_parse_args($args, $defaults);
120 120
 		$this->table_name      = Give()->donors->table_name;
121 121
 		$this->meta_table_name = Give()->donor_meta->table_name;
122 122
 		$this->meta_type       = Give()->donor_meta->meta_type;
@@ -158,21 +158,21 @@  discard block
 block discarded – undo
158 158
 		 *
159 159
 		 * @param Give_Donors_Query $this Donors query object.
160 160
 		 */
161
-		do_action( 'give_pre_get_donors', $this );
161
+		do_action('give_pre_get_donors', $this);
162 162
 
163
-		$cache_key = Give_Cache::get_key( 'give_donor', $this->get_sql(), false );
163
+		$cache_key = Give_Cache::get_key('give_donor', $this->get_sql(), false);
164 164
 
165 165
 		// Get donors from cache.
166
-		$this->donors = Give_Cache::get_db_query( $cache_key );
166
+		$this->donors = Give_Cache::get_db_query($cache_key);
167 167
 
168
-		if ( is_null( $this->donors ) ) {
169
-			if ( empty( $this->args['count'] ) ) {
170
-				$this->donors = $wpdb->get_results( $this->get_sql() );
168
+		if (is_null($this->donors)) {
169
+			if (empty($this->args['count'])) {
170
+				$this->donors = $wpdb->get_results($this->get_sql());
171 171
 			} else {
172
-				$this->donors = $wpdb->get_var( $this->get_sql() );
172
+				$this->donors = $wpdb->get_var($this->get_sql());
173 173
 			}
174 174
 
175
-			Give_Cache::set_db_query( $cache_key, $this->donors );
175
+			Give_Cache::set_db_query($cache_key, $this->donors);
176 176
 		}
177 177
 
178 178
 
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
 		 *
184 184
 		 * @param Give_Donors_Query $this Donors query object.
185 185
 		 */
186
-		do_action( 'give_post_get_donors', $this );
186
+		do_action('give_post_get_donors', $this);
187 187
 
188 188
 		return $this->donors;
189 189
 	}
@@ -200,7 +200,7 @@  discard block
 block discarded – undo
200 200
 	public function get_sql() {
201 201
 		global $wpdb;
202 202
 
203
-		if ( $this->args['number'] < 1 ) {
203
+		if ($this->args['number'] < 1) {
204 204
 			$this->args['number'] = 99999999999;
205 205
 		}
206 206
 
@@ -208,32 +208,32 @@  discard block
 block discarded – undo
208 208
 
209 209
 
210 210
 		// Set offset.
211
-		if ( empty( $this->args['offset'] ) && ( 0 < $this->args['paged'] ) ) {
212
-			$this->args['offset'] = $this->args['number'] * ( $this->args['paged'] - 1 );
211
+		if (empty($this->args['offset']) && (0 < $this->args['paged'])) {
212
+			$this->args['offset'] = $this->args['number'] * ($this->args['paged'] - 1);
213 213
 		}
214 214
 
215 215
 		// Set fields.
216 216
 		$fields = "{$this->table_name}.*";
217
-		if ( ! empty( $this->args['fields'] ) && 'all' !== $this->args['fields'] ) {
218
-			if ( is_string( $this->args['fields'] ) ) {
217
+		if ( ! empty($this->args['fields']) && 'all' !== $this->args['fields']) {
218
+			if (is_string($this->args['fields'])) {
219 219
 				$fields = "{$this->table_name}.{$this->args['fields']}";
220
-			} elseif ( is_array( $this->args['fields'] ) ) {
221
-				$fields = "{$this->table_name}." . implode( " , {$this->table_name}.", $this->args['fields'] );
220
+			} elseif (is_array($this->args['fields'])) {
221
+				$fields = "{$this->table_name}.".implode(" , {$this->table_name}.", $this->args['fields']);
222 222
 			}
223 223
 		}
224 224
 
225 225
 		// Set count.
226
-		if ( ! empty( $this->args['count'] ) ) {
226
+		if ( ! empty($this->args['count'])) {
227 227
 			$fields = "COUNT({$this->table_name}.id)";
228 228
 		}
229 229
 
230 230
 		$orderby = $this->get_order_query();
231 231
 
232
-		$sql = $wpdb->prepare( "SELECT {$fields} FROM {$this->table_name} LIMIT %d,%d;", absint( $this->args['offset'] ), absint( $this->args['number'] ) );
232
+		$sql = $wpdb->prepare("SELECT {$fields} FROM {$this->table_name} LIMIT %d,%d;", absint($this->args['offset']), absint($this->args['number']));
233 233
 
234 234
 		// $where, $orderby and order already prepared query they can generate notice if you re prepare them in above.
235 235
 		// WordPress consider LIKE condition as placeholder if start with s,f, or d.
236
-		$sql = str_replace( 'LIMIT', "{$where} {$orderby} LIMIT", $sql );
236
+		$sql = str_replace('LIMIT', "{$where} {$orderby} LIMIT", $sql);
237 237
 
238 238
 		return $sql;
239 239
 	}
@@ -250,11 +250,11 @@  discard block
 block discarded – undo
250 250
 	private function get_where_query() {
251 251
 
252 252
 		// Get sql query for meta.
253
-		if ( ! empty( $this->args['meta_query'] ) ) {
254
-			$meta_query_object = new WP_Meta_Query( $this->args['meta_query'] );
255
-			$meta_query        = $meta_query_object->get_sql( $this->meta_type, $this->table_name, 'id' );
253
+		if ( ! empty($this->args['meta_query'])) {
254
+			$meta_query_object = new WP_Meta_Query($this->args['meta_query']);
255
+			$meta_query        = $meta_query_object->get_sql($this->meta_type, $this->table_name, 'id');
256 256
 
257
-			$where[] = implode( '', $meta_query );
257
+			$where[] = implode('', $meta_query);
258 258
 		}
259 259
 
260 260
 		$where[] = 'WHERE 1=1';
@@ -267,9 +267,9 @@  discard block
 block discarded – undo
267 267
 		$where[] = $this->get_where_donation_count();
268 268
 		$where[] = $this->get_where_give_forms();
269 269
 
270
-		$where = array_filter( $where );
270
+		$where = array_filter($where);
271 271
 
272
-		return trim( implode( ' ', array_map( 'trim', $where ) ) );
272
+		return trim(implode(' ', array_map('trim', $where)));
273 273
 
274 274
 	}
275 275
 
@@ -287,17 +287,17 @@  discard block
 block discarded – undo
287 287
 
288 288
 		$where = '';
289 289
 
290
-		if ( ! empty( $this->args['email'] ) ) {
290
+		if ( ! empty($this->args['email'])) {
291 291
 
292
-			if ( is_array( $this->args['email'] ) ) {
292
+			if (is_array($this->args['email'])) {
293 293
 
294
-				$emails_count       = count( $this->args['email'] );
295
-				$emails_placeholder = array_fill( 0, $emails_count, '%s' );
296
-				$emails             = implode( ', ', $emails_placeholder );
294
+				$emails_count       = count($this->args['email']);
295
+				$emails_placeholder = array_fill(0, $emails_count, '%s');
296
+				$emails             = implode(', ', $emails_placeholder);
297 297
 
298
-				$where .= $wpdb->prepare( "AND {$this->table_name}.email IN( $emails )", $this->args['email'] );
298
+				$where .= $wpdb->prepare("AND {$this->table_name}.email IN( $emails )", $this->args['email']);
299 299
 			} else {
300
-				$where .= $wpdb->prepare( "AND {$this->table_name}.email = %s", $this->args['email'] );
300
+				$where .= $wpdb->prepare("AND {$this->table_name}.email = %s", $this->args['email']);
301 301
 			}
302 302
 		}
303 303
 
@@ -317,11 +317,11 @@  discard block
 block discarded – undo
317 317
 		$where = '';
318 318
 
319 319
 		// Specific donors.
320
-		if ( ! empty( $this->args['donor'] ) ) {
321
-			if ( ! is_array( $this->args['donor'] ) ) {
322
-				$this->args['donor'] = explode( ',', $this->args['donor'] );
320
+		if ( ! empty($this->args['donor'])) {
321
+			if ( ! is_array($this->args['donor'])) {
322
+				$this->args['donor'] = explode(',', $this->args['donor']);
323 323
 			}
324
-			$donor_ids = implode( ',', array_map( 'intval', $this->args['donor'] ) );
324
+			$donor_ids = implode(',', array_map('intval', $this->args['donor']));
325 325
 
326 326
 			$where .= "AND {$this->table_name}.id IN( {$donor_ids} )";
327 327
 		}
@@ -342,10 +342,10 @@  discard block
 block discarded – undo
342 342
 		$where = '';
343 343
 
344 344
 		// Donors created for a specific date or in a date range
345
-		if ( ! empty( $this->args['date_query'] ) ) {
346
-			$date_query_object = new WP_Date_Query( is_array( $this->args['date_query'] ) ? $this->args['date_query'] : wp_parse_args( $this->args['date_query'] ), "{$this->table_name}.date_created" );
345
+		if ( ! empty($this->args['date_query'])) {
346
+			$date_query_object = new WP_Date_Query(is_array($this->args['date_query']) ? $this->args['date_query'] : wp_parse_args($this->args['date_query']), "{$this->table_name}.date_created");
347 347
 
348
-			$where .= str_replace( array(
348
+			$where .= str_replace(array(
349 349
 				"\n",
350 350
 				'(   (',
351 351
 				'))',
@@ -353,7 +353,7 @@  discard block
 block discarded – undo
353 353
 				'',
354 354
 				'( (',
355 355
 				') )',
356
-			), $date_query_object->get_sql() );
356
+			), $date_query_object->get_sql());
357 357
 		}
358 358
 
359 359
 		return $where;
@@ -372,11 +372,11 @@  discard block
 block discarded – undo
372 372
 		$where = '';
373 373
 
374 374
 		// Donors created for a specific date or in a date range
375
-		if ( ! empty( $this->args['s'] ) && false !== strpos( $this->args['s'], ':' ) ) {
376
-			$search_parts = explode( ':', $this->args['s'] );
375
+		if ( ! empty($this->args['s']) && false !== strpos($this->args['s'], ':')) {
376
+			$search_parts = explode(':', $this->args['s']);
377 377
 
378
-			if ( ! empty( $search_parts[0] ) ) {
379
-				switch ( $search_parts[0] ) {
378
+			if ( ! empty($search_parts[0])) {
379
+				switch ($search_parts[0]) {
380 380
 					case 'name':
381 381
 						$where = "AND {$this->table_name}.name LIKE '%{$search_parts[1]}%'";
382 382
 						break;
@@ -404,11 +404,11 @@  discard block
 block discarded – undo
404 404
 		$where = '';
405 405
 
406 406
 		// Donors create for specific wp user.
407
-		if ( ! empty( $this->args['user'] ) ) {
408
-			if ( ! is_array( $this->args['user'] ) ) {
409
-				$this->args['user'] = explode( ',', $this->args['user'] );
407
+		if ( ! empty($this->args['user'])) {
408
+			if ( ! is_array($this->args['user'])) {
409
+				$this->args['user'] = explode(',', $this->args['user']);
410 410
 			}
411
-			$user_ids = implode( ',', array_map( 'intval', $this->args['user'] ) );
411
+			$user_ids = implode(',', array_map('intval', $this->args['user']));
412 412
 
413 413
 			$where .= "AND {$this->table_name}.user_id IN( {$user_ids} )";
414 414
 		}
@@ -430,7 +430,7 @@  discard block
 block discarded – undo
430 430
 		$query = array();
431 431
 		$ordersby = $this->args['orderby'];
432 432
 
433
-		if( ! is_array( $ordersby ) ) {
433
+		if ( ! is_array($ordersby)) {
434 434
 			$ordersby = array(
435 435
 				$this->args['orderby'] => $this->args['order']
436 436
 			);
@@ -438,23 +438,23 @@  discard block
 block discarded – undo
438 438
 
439 439
 		// Remove non existing column.
440 440
 		// Filter orderby values.
441
-		foreach ( $ordersby as $orderby => $order ) {
442
-			if( ! array_key_exists( $orderby, $table_columns ) ) {
443
-				unset( $ordersby[$orderby] );
441
+		foreach ($ordersby as $orderby => $order) {
442
+			if ( ! array_key_exists($orderby, $table_columns)) {
443
+				unset($ordersby[$orderby]);
444 444
 			}
445 445
 
446
-			$ordersby[ esc_sql( $orderby ) ] = esc_sql( $this->args['order'] );
446
+			$ordersby[esc_sql($orderby)] = esc_sql($this->args['order']);
447 447
 		}
448 448
 
449
-		if( empty( $ordersby ) ) {
449
+		if (empty($ordersby)) {
450 450
 			$ordersby = array(
451 451
 				'id' => $this->args['order']
452 452
 			);
453 453
 		}
454 454
 
455 455
 		// Create query.
456
-		foreach ( $ordersby as $orderby => $order ) {
457
-			switch ( $table_columns[ $orderby ] ) {
456
+		foreach ($ordersby as $orderby => $order) {
457
+			switch ($table_columns[$orderby]) {
458 458
 				case '%d':
459 459
 				case '%f':
460 460
 					$query[] = "{$this->table_name}.{$orderby}+0 {$order}";
@@ -465,7 +465,7 @@  discard block
 block discarded – undo
465 465
 			}
466 466
 		}
467 467
 
468
-		return ! empty( $query ) ? 'ORDER BY ' . implode( ', ', $query ) : '';
468
+		return ! empty($query) ? 'ORDER BY '.implode(', ', $query) : '';
469 469
 	}
470 470
 
471 471
 	/**
@@ -481,10 +481,10 @@  discard block
 block discarded – undo
481 481
 	private function get_where_donation_count() {
482 482
 		$where = '';
483 483
 
484
-		if ( ! empty( $this->args['donation_count'] ) ) {
484
+		if ( ! empty($this->args['donation_count'])) {
485 485
 			$compare = '>';
486 486
 			$amount  = $this->args['donation_count'];
487
-			if ( is_array( $this->args['donation_count'] ) ) {
487
+			if (is_array($this->args['donation_count'])) {
488 488
 				$compare = $this->args['donation_count'] ['compare'];
489 489
 				$amount = $this->args['donation_count']['amount'];
490 490
 			}
@@ -508,10 +508,10 @@  discard block
 block discarded – undo
508 508
 	private function get_where_donation_amount() {
509 509
 		$where = '';
510 510
 
511
-		if ( ! empty( $this->args['donation_amount'] ) ) {
511
+		if ( ! empty($this->args['donation_amount'])) {
512 512
 			$compare = '>';
513 513
 			$amount  = $this->args['donation_amount'];
514
-			if ( is_array( $this->args['donation_amount'] ) ) {
514
+			if (is_array($this->args['donation_amount'])) {
515 515
 				$compare = $this->args['donation_amount'] ['compare'];
516 516
 				$amount = $this->args['donation_amount']['amount'];
517 517
 			}
@@ -537,13 +537,13 @@  discard block
 block discarded – undo
537 537
 		global $wpdb;
538 538
 		$where = '';
539 539
 
540
-		if ( ! empty( $this->args['give_forms'] ) ) {
541
-			if ( ! is_array( $this->args['give_forms'] ) ) {
542
-				$this->args['give_forms'] = explode( ',', $this->args['give_forms'] );
540
+		if ( ! empty($this->args['give_forms'])) {
541
+			if ( ! is_array($this->args['give_forms'])) {
542
+				$this->args['give_forms'] = explode(',', $this->args['give_forms']);
543 543
 			}
544 544
 
545
-			$form_ids        = implode( ',', array_map( 'intval', $this->args['give_forms'] ) );
546
-			$donation_id_col = Give()->payment_meta->get_meta_type() . '_id';
545
+			$form_ids        = implode(',', array_map('intval', $this->args['give_forms']));
546
+			$donation_id_col = Give()->payment_meta->get_meta_type().'_id';
547 547
 
548 548
 			$query = $wpdb->prepare(
549 549
 				"
@@ -562,12 +562,12 @@  discard block
 block discarded – undo
562 562
 				$form_ids
563 563
 			);
564 564
 
565
-			$donor_ids = $wpdb->get_results( $query, ARRAY_A );
565
+			$donor_ids = $wpdb->get_results($query, ARRAY_A);
566 566
 
567
-			if ( ! empty( $donor_ids ) ) {
568
-				$donor_ids = wp_list_pluck( $donor_ids, 'donor_id' );
569
-				$donor_ids = implode( ',', array_map( 'intval', $donor_ids ) );
570
-				$where     .= "AND {$this->table_name}.id IN ({$donor_ids})";
567
+			if ( ! empty($donor_ids)) {
568
+				$donor_ids = wp_list_pluck($donor_ids, 'donor_id');
569
+				$donor_ids = implode(',', array_map('intval', $donor_ids));
570
+				$where .= "AND {$this->table_name}.id IN ({$donor_ids})";
571 571
 			} else {
572 572
 				$where .= "AND {$this->table_name}.id IN ('0')";
573 573
 			}
Please login to merge, or discard this patch.
includes/donors/actions.php 1 patch
Spacing   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -8,28 +8,28 @@  discard block
 block discarded – undo
8 8
  * @param array $donation_data
9 9
  *
10 10
  */
11
-function __give_insert_donor_donation_comment( $donation_id, $donation_data ) {
12
-	$is_anonymous_donation = isset( $_POST['give_anonymous_donation'] )
13
-		? absint( $_POST['give_anonymous_donation'] )
11
+function __give_insert_donor_donation_comment($donation_id, $donation_data) {
12
+	$is_anonymous_donation = isset($_POST['give_anonymous_donation'])
13
+		? absint($_POST['give_anonymous_donation'])
14 14
 		: 0;
15 15
 
16
-	if ( ! empty( $_POST['give_comment'] ) ) {
16
+	if ( ! empty($_POST['give_comment'])) {
17 17
 		$comment_id = give_insert_donor_donation_comment(
18 18
 			$donation_id,
19 19
 			$donation_data['user_info']['donor_id'],
20
-			trim( $_POST['give_comment'] ), // We are sanitizing comment in Give_comment:add
21
-			array( 'comment_author_email' => $donation_data['user_info']['email'] )
20
+			trim($_POST['give_comment']), // We are sanitizing comment in Give_comment:add
21
+			array('comment_author_email' => $donation_data['user_info']['email'])
22 22
 		);
23 23
 
24
-		update_comment_meta( $comment_id, '_give_anonymous_donation', $is_anonymous_donation );
25
-		Give()->donor_meta->update_meta( $donation_data['user_info']['donor_id'], '_give_has_comment', '1' );
24
+		update_comment_meta($comment_id, '_give_anonymous_donation', $is_anonymous_donation);
25
+		Give()->donor_meta->update_meta($donation_data['user_info']['donor_id'], '_give_has_comment', '1');
26 26
 	}
27 27
 
28
-	give_update_meta( $donation_id, '_give_anonymous_donation', $is_anonymous_donation );
29
-	Give()->donor_meta->update_meta( $donation_data['user_info']['donor_id'], '_give_anonymous_donor', $is_anonymous_donation );
28
+	give_update_meta($donation_id, '_give_anonymous_donation', $is_anonymous_donation);
29
+	Give()->donor_meta->update_meta($donation_data['user_info']['donor_id'], '_give_anonymous_donor', $is_anonymous_donation);
30 30
 }
31 31
 
32
-add_action( 'give_insert_payment', '__give_insert_donor_donation_comment', 10, 2 );
32
+add_action('give_insert_payment', '__give_insert_donor_donation_comment', 10, 2);
33 33
 
34 34
 
35 35
 /**
@@ -39,16 +39,16 @@  discard block
 block discarded – undo
39 39
  */
40 40
 function __give_validate_donor_comment() {
41 41
 	// Check wp_check_comment_data_max_lengths for comment length validation.
42
-	if ( ! empty( $_POST['give_comment'] ) ) {
42
+	if ( ! empty($_POST['give_comment'])) {
43 43
 		$max_lengths = wp_get_comment_fields_max_lengths();
44
-		$comment     = give_clean( $_POST['give_comment'] );
44
+		$comment     = give_clean($_POST['give_comment']);
45 45
 
46
-		if ( mb_strlen( $comment, '8bit' ) > $max_lengths['comment_content'] ) {
47
-			give_set_error( 'comment_content_column_length', __( 'Your comment is too long.', 'give' ) );
46
+		if (mb_strlen($comment, '8bit') > $max_lengths['comment_content']) {
47
+			give_set_error('comment_content_column_length', __('Your comment is too long.', 'give'));
48 48
 		}
49 49
 	}
50 50
 }
51
-add_action( 'give_checkout_error_checks', '__give_validate_donor_comment', 10, 1 );
51
+add_action('give_checkout_error_checks', '__give_validate_donor_comment', 10, 1);
52 52
 
53 53
 
54 54
 /**
@@ -59,18 +59,18 @@  discard block
 block discarded – undo
59 59
  * @param $donation_id
60 60
  * @param $status
61 61
  */
62
-function __give_update_donor_donation_comment_status( $donation_id, $status ) {
63
-	$approve = absint( 'publish' === $status );
62
+function __give_update_donor_donation_comment_status($donation_id, $status) {
63
+	$approve = absint('publish' === $status);
64 64
 
65 65
 	/* @var WP_Comment $note */
66
-	$donor_comment = give_get_donor_donation_comment( $donation_id, give_get_payment_donor_id( $donation_id ) );
66
+	$donor_comment = give_get_donor_donation_comment($donation_id, give_get_payment_donor_id($donation_id));
67 67
 
68
-	if( $donor_comment instanceof WP_Comment ) {
69
-		wp_set_comment_status( $donor_comment->comment_ID, (string) $approve );
68
+	if ($donor_comment instanceof WP_Comment) {
69
+		wp_set_comment_status($donor_comment->comment_ID, (string) $approve);
70 70
 	}
71 71
 }
72 72
 
73
-add_action( 'give_update_payment_status', '__give_update_donor_donation_comment_status', 10, 2 );
73
+add_action('give_update_payment_status', '__give_update_donor_donation_comment_status', 10, 2);
74 74
 
75 75
 /**
76 76
  * Remove donor comment when donation delete
@@ -79,13 +79,13 @@  discard block
 block discarded – undo
79 79
  *
80 80
  * @param $donation_id
81 81
  */
82
-function __give_remove_donor_donation_comment( $donation_id ) {
82
+function __give_remove_donor_donation_comment($donation_id) {
83 83
 	/* @var WP_Comment $note */
84
-	$donor_comment = give_get_donor_donation_comment( $donation_id, give_get_payment_donor_id( $donation_id ) );
84
+	$donor_comment = give_get_donor_donation_comment($donation_id, give_get_payment_donor_id($donation_id));
85 85
 
86
-	if( $donor_comment instanceof WP_Comment ) {
87
-		wp_delete_comment( $donor_comment->comment_ID );
86
+	if ($donor_comment instanceof WP_Comment) {
87
+		wp_delete_comment($donor_comment->comment_ID);
88 88
 	}
89 89
 }
90 90
 
91
-add_action( 'give_payment_deleted', '__give_remove_donor_donation_comment', 10 );
91
+add_action('give_payment_deleted', '__give_remove_donor_donation_comment', 10);
Please login to merge, or discard this patch.
includes/class-give-db-payment-meta.php 1 patch
Spacing   +5 added lines, -5 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
 
@@ -51,13 +51,13 @@  discard block
 block discarded – undo
51 51
 		global $wpdb;
52 52
 
53 53
 		// @todo: We leave $wpdb->paymentmeta for backward compatibility, use $wpdb->donationmeta instead. We can remove it after 2.1.3.
54
-		$wpdb->paymentmeta = $wpdb->donationmeta = $this->table_name = $wpdb->prefix . 'give_donationmeta';
54
+		$wpdb->paymentmeta = $wpdb->donationmeta = $this->table_name = $wpdb->prefix.'give_donationmeta';
55 55
 		$this->version     = '1.0';
56 56
 
57 57
 		// Backward compatibility.
58
-		if ( ! give_has_upgrade_completed( 'v213_rename_donation_meta_type' ) ) {
58
+		if ( ! give_has_upgrade_completed('v213_rename_donation_meta_type')) {
59 59
 			$this->meta_type = 'payment';
60
-			$wpdb->paymentmeta = $wpdb->donationmeta = $this->table_name = $wpdb->prefix . 'give_paymentmeta';
60
+			$wpdb->paymentmeta = $wpdb->donationmeta = $this->table_name = $wpdb->prefix.'give_paymentmeta';
61 61
 		}
62 62
 
63 63
 		$this->register_table();
@@ -90,6 +90,6 @@  discard block
 block discarded – undo
90 90
 	 * @return bool
91 91
 	 */
92 92
 	protected function is_custom_meta_table_active() {
93
-		return give_has_upgrade_completed( 'v20_move_metadata_into_new_table' );
93
+		return give_has_upgrade_completed('v20_move_metadata_into_new_table');
94 94
 	}
95 95
 }
Please login to merge, or discard this patch.
includes/actions.php 1 patch
Spacing   +77 added lines, -77 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
 
@@ -25,16 +25,16 @@  discard block
 block discarded – undo
25 25
  */
26 26
 function give_get_actions() {
27 27
 
28
-	$get_data = give_clean( $_GET ); // WPCS: input var ok, sanitization ok, CSRF ok.
28
+	$get_data = give_clean($_GET); // WPCS: input var ok, sanitization ok, CSRF ok.
29 29
 
30
-	$_get_action = ! empty( $get_data['give_action'] ) ? $get_data['give_action'] : null;
30
+	$_get_action = ! empty($get_data['give_action']) ? $get_data['give_action'] : null;
31 31
 
32 32
 	// Add backward compatibility to give-action param ( $_GET ).
33
-	if ( empty( $_get_action ) ) {
34
-		$_get_action = ! empty( $get_data['give-action'] ) ? $get_data['give-action'] : null;
33
+	if (empty($_get_action)) {
34
+		$_get_action = ! empty($get_data['give-action']) ? $get_data['give-action'] : null;
35 35
 	}
36 36
 
37
-	if ( isset( $_get_action ) ) {
37
+	if (isset($_get_action)) {
38 38
 		/**
39 39
 		 * Fires in WordPress init or admin init, when give_action is present in $_GET.
40 40
 		 *
@@ -42,12 +42,12 @@  discard block
 block discarded – undo
42 42
 		 *
43 43
 		 * @param array $_GET Array of HTTP GET variables.
44 44
 		 */
45
-		do_action( "give_{$_get_action}", $get_data );
45
+		do_action("give_{$_get_action}", $get_data);
46 46
 	}
47 47
 
48 48
 }
49 49
 
50
-add_action( 'init', 'give_get_actions' );
50
+add_action('init', 'give_get_actions');
51 51
 
52 52
 /**
53 53
  * Hooks Give actions, when present in the $_POST super global. Every give_action
@@ -60,16 +60,16 @@  discard block
 block discarded – undo
60 60
  */
61 61
 function give_post_actions() {
62 62
 
63
-	$post_data = give_clean( $_POST ); // WPCS: input var ok, sanitization ok, CSRF ok.
63
+	$post_data = give_clean($_POST); // WPCS: input var ok, sanitization ok, CSRF ok.
64 64
 
65
-	$_post_action = ! empty( $post_data['give_action'] ) ? $post_data['give_action'] : null;
65
+	$_post_action = ! empty($post_data['give_action']) ? $post_data['give_action'] : null;
66 66
 
67 67
 	// Add backward compatibility to give-action param ( $_POST ).
68
-	if ( empty( $_post_action ) ) {
69
-		$_post_action = ! empty( $post_data['give-action'] ) ? $post_data['give-action'] : null;
68
+	if (empty($_post_action)) {
69
+		$_post_action = ! empty($post_data['give-action']) ? $post_data['give-action'] : null;
70 70
 	}
71 71
 
72
-	if ( isset( $_post_action ) ) {
72
+	if (isset($_post_action)) {
73 73
 		/**
74 74
 		 * Fires in WordPress init or admin init, when give_action is present in $_POST.
75 75
 		 *
@@ -77,12 +77,12 @@  discard block
 block discarded – undo
77 77
 		 *
78 78
 		 * @param array $_POST Array of HTTP POST variables.
79 79
 		 */
80
-		do_action( "give_{$_post_action}", $post_data );
80
+		do_action("give_{$_post_action}", $post_data);
81 81
 	}
82 82
 
83 83
 }
84 84
 
85
-add_action( 'init', 'give_post_actions' );
85
+add_action('init', 'give_post_actions');
86 86
 
87 87
 /**
88 88
  * Connect WordPress user with Donor.
@@ -94,17 +94,17 @@  discard block
 block discarded – undo
94 94
  *
95 95
  * @return void
96 96
  */
97
-function give_connect_donor_to_wpuser( $user_id, $user_data ) {
97
+function give_connect_donor_to_wpuser($user_id, $user_data) {
98 98
 	/* @var Give_Donor $donor */
99
-	$donor = new Give_Donor( $user_data['user_email'] );
99
+	$donor = new Give_Donor($user_data['user_email']);
100 100
 
101 101
 	// Validate donor id and check if do nor is already connect to wp user or not.
102
-	if ( $donor->id && ! $donor->user_id ) {
102
+	if ($donor->id && ! $donor->user_id) {
103 103
 
104 104
 		// Update donor user_id.
105
-		if ( $donor->update( array( 'user_id' => $user_id ) ) ) {
106
-			$donor_note = sprintf( esc_html__( 'WordPress user #%d is connected to #%d', 'give' ), $user_id, $donor->id );
107
-			$donor->add_note( $donor_note );
105
+		if ($donor->update(array('user_id' => $user_id))) {
106
+			$donor_note = sprintf(esc_html__('WordPress user #%d is connected to #%d', 'give'), $user_id, $donor->id);
107
+			$donor->add_note($donor_note);
108 108
 
109 109
 			// Update user_id meta in payments.
110 110
 			// if( ! empty( $donor->payment_ids ) && ( $donations = explode( ',', $donor->payment_ids ) ) ) {
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
 	}
118 118
 }
119 119
 
120
-add_action( 'give_insert_user', 'give_connect_donor_to_wpuser', 10, 2 );
120
+add_action('give_insert_user', 'give_connect_donor_to_wpuser', 10, 2);
121 121
 
122 122
 
123 123
 /**
@@ -127,19 +127,19 @@  discard block
 block discarded – undo
127 127
  *
128 128
  * @param $data
129 129
  */
130
-function give_donor_batch_export_complete( $data ) {
130
+function give_donor_batch_export_complete($data) {
131 131
 	// Remove donor ids cache.
132 132
 	if (
133
-		isset( $data['class'] )
133
+		isset($data['class'])
134 134
 		&& 'Give_Batch_Donors_Export' === $data['class']
135
-		&& ! empty( $data['forms'] )
136
-		&& isset( $data['give_export_option']['query_id'] )
135
+		&& ! empty($data['forms'])
136
+		&& isset($data['give_export_option']['query_id'])
137 137
 	) {
138
-		Give_Cache::delete( Give_Cache::get_key( $data['give_export_option']['query_id'] ) );
138
+		Give_Cache::delete(Give_Cache::get_key($data['give_export_option']['query_id']));
139 139
 	}
140 140
 }
141 141
 
142
-add_action( 'give_file_export_complete', 'give_donor_batch_export_complete' );
142
+add_action('give_file_export_complete', 'give_donor_batch_export_complete');
143 143
 
144 144
 /**
145 145
  * Print css for wordpress setting pages.
@@ -150,12 +150,12 @@  discard block
 block discarded – undo
150 150
 	/* @var WP_Screen $screen */
151 151
 	$screen = get_current_screen();
152 152
 
153
-	if ( ! ( $screen instanceof WP_Screen ) ) {
153
+	if ( ! ($screen instanceof WP_Screen)) {
154 154
 		return false;
155 155
 	}
156 156
 
157
-	switch ( true ) {
158
-		case ( 'plugins' === $screen->base || 'plugins-network' === $screen->base ):
157
+	switch (true) {
158
+		case ('plugins' === $screen->base || 'plugins-network' === $screen->base):
159 159
 			?>
160 160
 			<style>
161 161
 				tr.active.update + tr.give-addon-notice-tr td {
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
 	}
193 193
 }
194 194
 
195
-add_action( 'admin_head', 'give_admin_quick_css' );
195
+add_action('admin_head', 'give_admin_quick_css');
196 196
 
197 197
 
198 198
 /**
@@ -204,31 +204,31 @@  discard block
 block discarded – undo
204 204
  *
205 205
  * @return void
206 206
  */
207
-function give_set_donation_levels_max_min_amount( $form_id ) {
207
+function give_set_donation_levels_max_min_amount($form_id) {
208 208
 	if (
209
-		( 'set' === $_POST['_give_price_option'] ) ||
210
-		( in_array( '_give_donation_levels', $_POST ) && count( $_POST['_give_donation_levels'] ) <= 0 ) ||
211
-		! ( $donation_levels_amounts = wp_list_pluck( $_POST['_give_donation_levels'], '_give_amount' ) )
209
+		('set' === $_POST['_give_price_option']) ||
210
+		(in_array('_give_donation_levels', $_POST) && count($_POST['_give_donation_levels']) <= 0) ||
211
+		! ($donation_levels_amounts = wp_list_pluck($_POST['_give_donation_levels'], '_give_amount'))
212 212
 	) {
213 213
 		// Delete old meta.
214
-		give_delete_meta( $form_id, '_give_levels_minimum_amount' );
215
-		give_delete_meta( $form_id, '_give_levels_maximum_amount' );
214
+		give_delete_meta($form_id, '_give_levels_minimum_amount');
215
+		give_delete_meta($form_id, '_give_levels_maximum_amount');
216 216
 
217 217
 		return;
218 218
 	}
219 219
 
220 220
 	// Sanitize donation level amounts.
221
-	$donation_levels_amounts = array_map( 'give_maybe_sanitize_amount', $donation_levels_amounts );
221
+	$donation_levels_amounts = array_map('give_maybe_sanitize_amount', $donation_levels_amounts);
222 222
 
223
-	$min_amount = min( $donation_levels_amounts );
224
-	$max_amount = max( $donation_levels_amounts );
223
+	$min_amount = min($donation_levels_amounts);
224
+	$max_amount = max($donation_levels_amounts);
225 225
 
226 226
 	// Set Minimum and Maximum amount for Multi Level Donation Forms.
227
-	give_update_meta( $form_id, '_give_levels_minimum_amount', $min_amount ? give_sanitize_amount_for_db( $min_amount ) : 0 );
228
-	give_update_meta( $form_id, '_give_levels_maximum_amount', $max_amount ? give_sanitize_amount_for_db( $max_amount ) : 0 );
227
+	give_update_meta($form_id, '_give_levels_minimum_amount', $min_amount ? give_sanitize_amount_for_db($min_amount) : 0);
228
+	give_update_meta($form_id, '_give_levels_maximum_amount', $max_amount ? give_sanitize_amount_for_db($max_amount) : 0);
229 229
 }
230 230
 
231
-add_action( 'give_pre_process_give_forms_meta', 'give_set_donation_levels_max_min_amount', 30 );
231
+add_action('give_pre_process_give_forms_meta', 'give_set_donation_levels_max_min_amount', 30);
232 232
 
233 233
 
234 234
 /**
@@ -238,23 +238,23 @@  discard block
 block discarded – undo
238 238
  *
239 239
  * @param int $payment_id
240 240
  */
241
-function _give_save_donor_billing_address( $payment_id ) {
242
-	$donor_id  = absint( give_get_payment_donor_id( $payment_id ));
241
+function _give_save_donor_billing_address($payment_id) {
242
+	$donor_id = absint(give_get_payment_donor_id($payment_id));
243 243
 
244 244
 	// Bailout
245
-	if ( ! $donor_id ) {
245
+	if ( ! $donor_id) {
246 246
 		return;
247 247
 	}
248 248
 
249 249
 
250 250
 	/* @var Give_Donor $donor */
251
-	$donor = new Give_Donor( $donor_id );
251
+	$donor = new Give_Donor($donor_id);
252 252
 
253 253
 	// Save address.
254
-	$donor->add_address( 'billing[]', give_get_donation_address( $payment_id ) );
254
+	$donor->add_address('billing[]', give_get_donation_address($payment_id));
255 255
 }
256 256
 
257
-add_action( 'give_complete_donation', '_give_save_donor_billing_address', 9999 );
257
+add_action('give_complete_donation', '_give_save_donor_billing_address', 9999);
258 258
 
259 259
 
260 260
 /**
@@ -264,26 +264,26 @@  discard block
 block discarded – undo
264 264
  *
265 265
  * @param array $args
266 266
  */
267
-function give_update_log_form_id( $args ) {
268
-	$new_form_id = absint( $args[0] );
269
-	$payment_id  = absint( $args[1] );
270
-	$logs        = Give()->logs->get_logs( $payment_id );
267
+function give_update_log_form_id($args) {
268
+	$new_form_id = absint($args[0]);
269
+	$payment_id  = absint($args[1]);
270
+	$logs        = Give()->logs->get_logs($payment_id);
271 271
 
272 272
 	// Bailout.
273
-	if ( empty( $logs ) ) {
273
+	if (empty($logs)) {
274 274
 		return;
275 275
 	}
276 276
 
277 277
 	/* @var object $log */
278
-	foreach ( $logs as $log ) {
279
-		Give()->logs->logmeta_db->update_meta( $log->ID, '_give_log_form_id', $new_form_id );
278
+	foreach ($logs as $log) {
279
+		Give()->logs->logmeta_db->update_meta($log->ID, '_give_log_form_id', $new_form_id);
280 280
 	}
281 281
 
282 282
 	// Delete cache.
283 283
 	Give()->logs->delete_cache();
284 284
 }
285 285
 
286
-add_action( 'give_update_log_form_id', 'give_update_log_form_id' );
286
+add_action('give_update_log_form_id', 'give_update_log_form_id');
287 287
 
288 288
 /**
289 289
  * Verify addon dependency before addon update
@@ -295,22 +295,22 @@  discard block
 block discarded – undo
295 295
  *
296 296
  * @return WP_Error
297 297
  */
298
-function __give_verify_addon_dependency_before_update( $error, $hook_extra ) {
298
+function __give_verify_addon_dependency_before_update($error, $hook_extra) {
299 299
 	// Bailout.
300
-	if ( is_wp_error( $error ) ) {
300
+	if (is_wp_error($error)) {
301 301
 		return $error;
302 302
 	}
303 303
 
304
-	$plugin_base    = strtolower( $hook_extra['plugin'] );
305
-	$licensed_addon = array_map( 'strtolower', Give_License::get_licensed_addons() );
304
+	$plugin_base    = strtolower($hook_extra['plugin']);
305
+	$licensed_addon = array_map('strtolower', Give_License::get_licensed_addons());
306 306
 
307 307
 	// Skip if not a Give addon.
308
-	if ( ! in_array( $plugin_base, $licensed_addon ) ) {
308
+	if ( ! in_array($plugin_base, $licensed_addon)) {
309 309
 		return $error;
310 310
 	}
311 311
 
312
-	$plugin_base = strtolower( $plugin_base );
313
-	$plugin_slug = str_replace( '.php', '', basename( $plugin_base ) );
312
+	$plugin_base = strtolower($plugin_base);
313
+	$plugin_slug = str_replace('.php', '', basename($plugin_base));
314 314
 
315 315
 	/**
316 316
 	 * Filter the addon readme.txt url
@@ -323,15 +323,15 @@  discard block
 block discarded – undo
323 323
 		$plugin_slug
324 324
 	);
325 325
 
326
-	$parser           = new Give_Readme_Parser( $url );
326
+	$parser           = new Give_Readme_Parser($url);
327 327
 	$give_min_version = $parser->requires_at_least();
328 328
 
329 329
 
330
-	if ( version_compare( GIVE_VERSION, $give_min_version, '<' ) ) {
330
+	if (version_compare(GIVE_VERSION, $give_min_version, '<')) {
331 331
 		return new WP_Error(
332 332
 			'Give_Addon_Update_Error',
333 333
 			sprintf(
334
-				__( 'Give version %s is required to update this add-on.', 'give' ),
334
+				__('Give version %s is required to update this add-on.', 'give'),
335 335
 				$give_min_version
336 336
 			)
337 337
 		);
@@ -340,7 +340,7 @@  discard block
 block discarded – undo
340 340
 	return $error;
341 341
 }
342 342
 
343
-add_filter( 'upgrader_pre_install', '__give_verify_addon_dependency_before_update', 10, 2 );
343
+add_filter('upgrader_pre_install', '__give_verify_addon_dependency_before_update', 10, 2);
344 344
 
345 345
 /**
346 346
  * Function to add suppress_filters param if WPML add-on is activated.
@@ -351,7 +351,7 @@  discard block
 block discarded – undo
351 351
  *
352 352
  * @return array WP query argument for Total Goal.
353 353
  */
354
-function __give_wpml_total_goal_shortcode_agrs( $args ) {
354
+function __give_wpml_total_goal_shortcode_agrs($args) {
355 355
 	$args['suppress_filters'] = true;
356 356
 
357 357
 	return $args;
@@ -386,19 +386,19 @@  discard block
 block discarded – undo
386 386
  * @since 2.1.4
387 387
  */
388 388
 function give_add_support_for_wpml() {
389
-	if ( ! function_exists( 'is_plugin_active' ) ) {
390
-		include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
389
+	if ( ! function_exists('is_plugin_active')) {
390
+		include_once(ABSPATH.'wp-admin/includes/plugin.php');
391 391
 	}
392 392
 
393 393
 
394
-	if ( is_plugin_active( 'sitepress-multilingual-cms/sitepress.php' ) ) {
394
+	if (is_plugin_active('sitepress-multilingual-cms/sitepress.php')) {
395 395
 
396
-		add_filter( 'give_totals_goal_shortcode_query_args', '__give_wpml_total_goal_shortcode_agrs' );
396
+		add_filter('give_totals_goal_shortcode_query_args', '__give_wpml_total_goal_shortcode_agrs');
397 397
 
398 398
 		// @see https://wpml.org/forums/topic/problem-with-query-filter-in-get_posts-function/#post-271309
399
-		add_action( 'give_totals_goal_shortcode_before_render', '__give_remove_wpml_parse_query_filter', 99 );
400
-		add_action( 'give_totals_goal_shortcode_after_render', '__give_add_wpml_parse_query_filter', 99 );
399
+		add_action('give_totals_goal_shortcode_before_render', '__give_remove_wpml_parse_query_filter', 99);
400
+		add_action('give_totals_goal_shortcode_after_render', '__give_add_wpml_parse_query_filter', 99);
401 401
 	}
402 402
 }
403 403
 
404
-add_action( 'give_init', 'give_add_support_for_wpml', 1000 );
404
+add_action('give_init', 'give_add_support_for_wpml', 1000);
Please login to merge, or discard this patch.