Issues (4296)

Security Analysis    not enabled

This project does not seem to handle request data directly as such no vulnerable execution paths were found.

  Cross-Site Scripting
Cross-Site Scripting enables an attacker to inject code into the response of a web-request that is viewed by other users. It can for example be used to bypass access controls, or even to take over other users' accounts.
  File Exposure
File Exposure allows an attacker to gain access to local files that he should not be able to access. These files can for example include database credentials, or other configuration files.
  File Manipulation
File Manipulation enables an attacker to write custom data to files. This potentially leads to injection of arbitrary code on the server.
  Object Injection
Object Injection enables an attacker to inject an object into PHP code, and can lead to arbitrary code execution, file exposure, or file manipulation attacks.
  Code Injection
Code Injection enables an attacker to execute arbitrary code on the server.
  Response Splitting
Response Splitting can be used to send arbitrary responses.
  File Inclusion
File Inclusion enables an attacker to inject custom files into PHP's file loading mechanism, either explicitly passed to include, or for example via PHP's auto-loading mechanism.
  Command Injection
Command Injection enables an attacker to inject a shell command that is execute with the privileges of the web-server. This can be used to expose sensitive data, or gain access of your server.
  SQL Injection
SQL Injection enables an attacker to execute arbitrary SQL code on your database server gaining access to user data, or manipulating user data.
  XPath Injection
XPath Injection enables an attacker to modify the parts of XML document that are read. If that XML document is for example used for authentication, this can lead to further vulnerabilities similar to SQL Injection.
  LDAP Injection
LDAP Injection enables an attacker to inject LDAP statements potentially granting permission to run unauthorized queries, or modify content inside the LDAP tree.
  Header Injection
  Other Vulnerability
This category comprises other attack vectors such as manipulating the PHP runtime, loading custom extensions, freezing the runtime, or similar.
  Regex Injection
Regex Injection enables an attacker to execute arbitrary code in your PHP process.
  XML Injection
XML Injection enables an attacker to read files on your local filesystem including configuration files, or can be abused to freeze your web-server process.
  Variable Injection
Variable Injection enables an attacker to overwrite program variables with custom data, and can lead to further vulnerabilities.
Unfortunately, the security analysis is currently not available for your project. If you are a non-commercial open-source project, please contact support to gain access.

includes/currency-functions.php (251 issues)

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<?php
2
/**
3
 * Currency Functions
4
 *
5
 * @package     Give
6
 * @subpackage  Functions
7
 * @copyright   Copyright (c) 2017, WordImpress
8
 * @license     https://opensource.org/licenses/gpl-license GNU Public License
9
 * @since       1.8.17
10
 */
11
12
/**
13
 * Get the set currency
14
 *
15
 * @since 1.0
16
 * @since 1.8.15 Upgrade function to handle dynamic currency
17
 *
18
 * @param int          $donation_or_form_id Donation or Form ID
19
 * @param array|object $args                Additional data
20
 *
21
 * @return string The currency code
22
 */
23
function give_get_currency( $donation_or_form_id = null, $args = array() ) {
24
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 );
28
29
		if ( empty( $currency ) ) {
30
			$currency = give_get_option( 'currency', 'USD' );
31
		}
32
	} else {
33
		$currency = give_get_option( 'currency', 'USD' );
34
	}
35
36
	/**
37
	 * Filter the currency on basis of donation, form id, or additional data.
38
	 *
39
	 * @since 1.0
40
	 */
41
	return apply_filters( 'give_currency', $currency, $donation_or_form_id, $args );
42
}
43
44
/**
45
 * Get the set currency position
46
 *
47
 * @since 1.3.6
48
 *
49
 * @return string The currency code
50
 */
51
function give_get_currency_position() {
52
53
	$currency_pos = give_get_option( 'currency_position', 'before' );
54
55
	return apply_filters( 'give_currency_position', $currency_pos );
56
}
57
58
/**
59
 * Get Currencies List
60
 *
61
 * @since 1.8.17
62
 *
63
 * @return array $currencies A list of the available currencies
64
 */
65
function give_get_currencies_list() {
66
	$currencies = array(
67
		'USD' => array(
68
			'admin_label' => sprintf( __('US Dollars (%1$s)', 'give'), '&#36;'),
0 ignored issues
show
Expected 1 spaces before closing bracket; 0 found
Loading history...
Expected 1 spaces after opening bracket; 0 found
Loading history...
69
			'symbol'      => '&#36;',
70
			'setting'     => array(
71
				'currency_position'   => 'before',
72
				'thousands_separator' => ',',
73
				'decimal_separator'   => '.',
74
				'number_decimals'     => 2,
75
			),
76
		),
77
		'EUR' => array(
78
			'admin_label' => sprintf( __('Euros (%1$s)', 'give'), '&euro;'),
0 ignored issues
show
Expected 1 spaces before closing bracket; 0 found
Loading history...
Expected 1 spaces after opening bracket; 0 found
Loading history...
79
			'symbol'      => '&euro;',
80
			'setting'     => array(
81
				'currency_position'   => 'before',
82
				'thousands_separator' => '.',
83
				'decimal_separator'   => ',',
84
				'number_decimals'     => 2,
85
			),
86
		),
87
		'GBP' => array(
88
			'admin_label' => sprintf( __('Pounds Sterling (%1$s)', 'give'), '&pound;'),
0 ignored issues
show
Expected 1 spaces before closing bracket; 0 found
Loading history...
Expected 1 spaces after opening bracket; 0 found
Loading history...
89
			'symbol'      => '&pound;',
90
			'setting'     => array(
91
				'currency_position'   => 'before',
92
				'thousands_separator' => ',',
93
				'decimal_separator'   => '.',
94
				'number_decimals'     => 2,
95
			),
96
		),
97
		'AUD' => array(
98
			'admin_label' => sprintf( __('Australian Dollars (%1$s)', 'give'), '&#36;'),
0 ignored issues
show
Expected 1 spaces before closing bracket; 0 found
Loading history...
Expected 1 spaces after opening bracket; 0 found
Loading history...
99
			'symbol'      => '&#36;',
100
			'setting'     => array(
101
				'currency_position'   => 'before',
102
				'thousands_separator' => ',',
103
				'decimal_separator'   => '.',
104
				'number_decimals'     => 2,
105
			),
106
		),
107
		'BRL' => array(
108
			'admin_label' => sprintf( __('Brazilian Real (%1$s)', 'give'), '&#82;&#36;'),
0 ignored issues
show
Expected 1 spaces before closing bracket; 0 found
Loading history...
Expected 1 spaces after opening bracket; 0 found
Loading history...
109
			'symbol'      => '&#82;&#36;',
110
			'setting'     => array(
111
				'currency_position'   => 'before',
112
				'thousands_separator' => ',',
113
				'decimal_separator'   => '.',
114
				'number_decimals'     => 2,
115
			),
116
		),
117
		'CAD' => array(
118
			'admin_label' => sprintf( __('Canadian Dollars (%1$s)', 'give'), '&#36;'),
0 ignored issues
show
Expected 1 spaces before closing bracket; 0 found
Loading history...
Expected 1 spaces after opening bracket; 0 found
Loading history...
119
			'symbol'      => '&#36;',
120
			'setting'     => array(
121
				'currency_position'   => 'before',
122
				'thousands_separator' => ',',
123
				'decimal_separator'   => '.',
124
				'number_decimals'     => 2,
125
			),
126
		),
127
		'CZK' => array(
128
			'admin_label' => sprintf( __('Czech Koruna (%1$s)', 'give'), '&#75;&#269;'),
0 ignored issues
show
Expected 1 spaces before closing bracket; 0 found
Loading history...
Expected 1 spaces after opening bracket; 0 found
Loading history...
129
			'symbol'      => '&#75;&#269;',
130
			'setting'     => array(
131
				'currency_position'   => 'after',
132
				'thousands_separator' => ',',
133
				'decimal_separator'   => '.',
134
				'number_decimals'     => 2,
135
			),
136
		),
137
		'DKK' => array(
138
			'admin_label' => sprintf( __('Danish Krone (%1$s)', 'give'), '&nbsp;kr.&nbsp;'),
0 ignored issues
show
Expected 1 spaces before closing bracket; 0 found
Loading history...
Expected 1 spaces after opening bracket; 0 found
Loading history...
139
			'symbol'      => '&nbsp;kr.&nbsp;',
140
			'setting'     => array(
141
				'currency_position'   => 'before',
142
				'thousands_separator' => ',',
143
				'decimal_separator'   => '.',
144
				'number_decimals'     => 2,
145
			),
146
		),
147
		'HKD' => array(
148
			'admin_label' => sprintf( __('Hong Kong Dollar (%1$s)', 'give'), '&#36;'),
0 ignored issues
show
Expected 1 spaces before closing bracket; 0 found
Loading history...
Expected 1 spaces after opening bracket; 0 found
Loading history...
149
			'symbol'      => '&#36;',
150
			'setting'     => array(
151
				'currency_position'   => 'before',
152
				'thousands_separator' => ',',
153
				'decimal_separator'   => '.',
154
				'number_decimals'     => 2,
155
			),
156
		),
157
		'HUF' => array(
158
			'admin_label' => sprintf( __('Hungarian Forint (%1$s)', 'give'), '&#70;&#116;'),
0 ignored issues
show
Expected 1 spaces before closing bracket; 0 found
Loading history...
Expected 1 spaces after opening bracket; 0 found
Loading history...
159
			'symbol'      => '&#70;&#116;',
160
			'setting'     => array(
161
				'currency_position'   => 'after',
162
				'thousands_separator' => ',',
163
				'decimal_separator'   => '.',
164
				'number_decimals'     => 2,
165
			),
166
		),
167
		'ILS' => array(
168
			'admin_label' => sprintf( __('Israeli Shekel (%1$s)', 'give'), '&#8362;'),
0 ignored issues
show
Expected 1 spaces before closing bracket; 0 found
Loading history...
Expected 1 spaces after opening bracket; 0 found
Loading history...
169
			'symbol'      => '&#8362;',
170
			'setting'     => array(
171
				'currency_position'   => 'after',
172
				'thousands_separator' => ',',
173
				'decimal_separator'   => '.',
174
				'number_decimals'     => 2,
175
			),
176
		),
177
		'JPY' => array(
178
			'admin_label' => sprintf( __('Japanese Yen (%1$s)', 'give'), '&yen;'),
0 ignored issues
show
Expected 1 spaces before closing bracket; 0 found
Loading history...
Expected 1 spaces after opening bracket; 0 found
Loading history...
179
			'symbol'      => '&yen;',
180
			'setting'     => array(
181
				'currency_position'   => 'before',
182
				'thousands_separator' => ',',
183
				'decimal_separator'   => '.',
184
				'number_decimals'     => 0,
185
			),
186
		),
187
		'MYR' => array(
188
			'admin_label' => sprintf( __('Malaysian Ringgits (%1$s)', 'give'), '&#82;&#77;'),
0 ignored issues
show
Expected 1 spaces before closing bracket; 0 found
Loading history...
Expected 1 spaces after opening bracket; 0 found
Loading history...
189
			'symbol'      => '&#82;&#77;',
190
			'setting'     => array(
191
				'currency_position'   => 'before',
192
				'thousands_separator' => ',',
193
				'decimal_separator'   => '.',
194
				'number_decimals'     => 2,
195
			),
196
		),
197
		'MXN' => array(
198
			'admin_label' => sprintf( __('Mexican Peso (%1$s)', 'give'), '&#36;'),
0 ignored issues
show
Expected 1 spaces before closing bracket; 0 found
Loading history...
Expected 1 spaces after opening bracket; 0 found
Loading history...
199
			'symbol'      => '&#36;',
200
			'setting'     => array(
201
				'currency_position'   => 'before',
202
				'thousands_separator' => ',',
203
				'decimal_separator'   => '.',
204
				'number_decimals'     => 2,
205
			),
206
		),
207
		'MAD' => array(
208
			'admin_label' => sprintf( __('Moroccan Dirham (%1$s)', 'give'), '&#x2e;&#x62f;&#x2e;&#x645;'),
0 ignored issues
show
Expected 1 spaces before closing bracket; 0 found
Loading history...
Expected 1 spaces after opening bracket; 0 found
Loading history...
209
			'symbol'      => '&#x2e;&#x62f;&#x2e;&#x645;',
210
			'setting'     => array(
211
				'currency_position'   => 'before',
212
				'thousands_separator' => ',',
213
				'decimal_separator'   => '.',
214
				'number_decimals'     => 2,
215
			),
216
		),
217
		'NZD' => array(
218
			'admin_label' => sprintf( __('New Zealand Dollar (%1$s)', 'give'), '&#36;'),
0 ignored issues
show
Expected 1 spaces before closing bracket; 0 found
Loading history...
Expected 1 spaces after opening bracket; 0 found
Loading history...
219
			'symbol'      => '&#36;',
220
			'setting'     => array(
221
				'currency_position'   => 'before',
222
				'thousands_separator' => ',',
223
				'decimal_separator'   => '.',
224
				'number_decimals'     => 2,
225
			),
226
		),
227
		'NOK' => array(
228
			'admin_label' => sprintf( __('Norwegian Krone (%1$s)', 'give'), '&#107;&#114;.'),
0 ignored issues
show
Expected 1 spaces before closing bracket; 0 found
Loading history...
Expected 1 spaces after opening bracket; 0 found
Loading history...
229
			'symbol'      => '&#107;&#114;.',
230
			'setting'     => array(
231
				'currency_position'   => 'before',
232
				'thousands_separator' => '.',
233
				'decimal_separator'   => ',',
234
				'number_decimals'     => 2,
235
			),
236
		),
237
		'PHP' => array(
238
			'admin_label' => sprintf( __('Philippine Pesos (%1$s)', 'give'), '&#8369;'),
0 ignored issues
show
Expected 1 spaces before closing bracket; 0 found
Loading history...
Expected 1 spaces after opening bracket; 0 found
Loading history...
239
			'symbol'      => '&#8369;',
240
			'setting'     => array(
241
				'currency_position'   => 'before',
242
				'thousands_separator' => ',',
243
				'decimal_separator'   => '.',
244
				'number_decimals'     => 2,
245
			),
246
		),
247
		'PLN' => array(
248
			'admin_label' => sprintf( __('Polish Zloty (%1$s)', 'give'), '&#122;&#322;'),
0 ignored issues
show
Expected 1 spaces before closing bracket; 0 found
Loading history...
Expected 1 spaces after opening bracket; 0 found
Loading history...
249
			'symbol'      => '&#122;&#322;',
250
			'setting'     => array(
251
				'currency_position'   => 'after',
252
				'thousands_separator' => ' ',
253
				'decimal_separator'   => ',',
254
				'number_decimals'     => 2,
255
			),
256
		),
257
		'SGD' => array(
258
			'admin_label' => sprintf( __('Singapore Dollar (%1$s)', 'give'), '&#36;'),
0 ignored issues
show
Expected 1 spaces before closing bracket; 0 found
Loading history...
Expected 1 spaces after opening bracket; 0 found
Loading history...
259
			'symbol'      => '&#36;',
260
			'setting'     => array(
261
				'currency_position'   => 'before',
262
				'thousands_separator' => ',',
263
				'decimal_separator'   => '.',
264
				'number_decimals'     => 2,
265
			),
266
		),
267
		'KRW' => array(
268
			'admin_label' => sprintf( __('South Korean Won (%1$s)', 'give'), '&#8361;'),
0 ignored issues
show
Expected 1 spaces before closing bracket; 0 found
Loading history...
Expected 1 spaces after opening bracket; 0 found
Loading history...
269
			'symbol'      => '&#8361;',
270
			'setting'     => array(
271
				'currency_position'   => 'before',
272
				'thousands_separator' => ',',
273
				'decimal_separator'   => '.',
274
				'number_decimals'     => 0,
275
			),
276
		),
277
		'ZAR' => array(
278
			'admin_label' => sprintf( __('South African Rand (%1$s)', 'give'), '&#82;'),
0 ignored issues
show
Expected 1 spaces before closing bracket; 0 found
Loading history...
Expected 1 spaces after opening bracket; 0 found
Loading history...
279
			'symbol'      => '&#82;',
280
			'setting'     => array(
281
				'currency_position'   => 'before',
282
				'thousands_separator' => ' ',
283
				'decimal_separator'   => '.',
284
				'number_decimals'     => 2,
285
			),
286
		),
287
		'SEK' => array(
288
			'admin_label' => sprintf( __('Swedish Krona (%1$s)', 'give'), '&nbsp;kr.&nbsp;'),
0 ignored issues
show
Expected 1 spaces before closing bracket; 0 found
Loading history...
Expected 1 spaces after opening bracket; 0 found
Loading history...
289
			'symbol'      => '&nbsp;kr.&nbsp;',
290
			'setting'     => array(
291
				'currency_position'   => 'before',
292
				'thousands_separator' => ' ',
293
				'decimal_separator'   => ',',
294
				'number_decimals'     => 2,
295
			),
296
		),
297
		'CHF' => array(
298
			'admin_label' => sprintf( __('Swiss Franc (%1$s)', 'give'), '&#70;&#114;'),
0 ignored issues
show
Expected 1 spaces before closing bracket; 0 found
Loading history...
Expected 1 spaces after opening bracket; 0 found
Loading history...
299
			'symbol'      => '&#70;&#114;',
300
			'setting'     => array(
301
				'currency_position'   => 'before',
302
				'thousands_separator' => ',',
303
				'decimal_separator'   => '.',
304
				'number_decimals'     => 2,
305
			),
306
		),
307
		'TWD' => array(
308
			'admin_label' => sprintf( __('Taiwan New Dollars (%1$s)', 'give'), '&#78;&#84;&#36;'),
0 ignored issues
show
Expected 1 spaces before closing bracket; 0 found
Loading history...
Expected 1 spaces after opening bracket; 0 found
Loading history...
309
			'symbol'      => '&#78;&#84;&#36;',
310
			'setting'     => array(
311
				'currency_position'   => 'before',
312
				'thousands_separator' => '\'',
313
				'decimal_separator'   => '.',
314
				'number_decimals'     => 2,
315
			),
316
		),
317
		'THB' => array(
318
			'admin_label' => sprintf( __('Thai Baht (%1$s)', 'give'), '&#3647;'),
0 ignored issues
show
Expected 1 spaces before closing bracket; 0 found
Loading history...
Expected 1 spaces after opening bracket; 0 found
Loading history...
319
			'symbol'      => '&#3647;',
320
			'setting'     => array(
321
				'currency_position'   => 'before',
322
				'thousands_separator' => ',',
323
				'decimal_separator'   => '.',
324
				'number_decimals'     => 2,
325
			),
326
		),
327
		'INR' => array(
328
			'admin_label' => sprintf( __('Indian Rupee (%1$s)', 'give'), '&#8377;'),
0 ignored issues
show
Expected 1 spaces before closing bracket; 0 found
Loading history...
Expected 1 spaces after opening bracket; 0 found
Loading history...
329
			'symbol'      => '&#8377;',
330
			'setting'     => array(
331
				'currency_position'   => 'before',
332
				'thousands_separator' => ',',
333
				'decimal_separator'   => '.',
334
				'number_decimals'     => 2,
335
			),
336
		),
337
		'TRY' => array(
338
			'admin_label' => sprintf( __('Turkish Lira (%1$s)', 'give'), '&#8378;'),
0 ignored issues
show
Expected 1 spaces before closing bracket; 0 found
Loading history...
Expected 1 spaces after opening bracket; 0 found
Loading history...
339
			'symbol'      => '&#8378;',
340
			'setting'     => array(
341
				'currency_position'   => 'after',
342
				'thousands_separator' => ',',
343
				'decimal_separator'   => '.',
344
				'number_decimals'     => 2,
345
			),
346
		),
347
		'IRR' => array(
348
			'admin_label' => sprintf( __('Iranian Rial (%1$s)', 'give'), '&#xfdfc;'),
0 ignored issues
show
Expected 1 spaces before closing bracket; 0 found
Loading history...
Expected 1 spaces after opening bracket; 0 found
Loading history...
349
			'symbol'      => '&#xfdfc;',
350
			'setting'     => array(
351
				'currency_position'   => 'after',
352
				'thousands_separator' => ',',
353
				'decimal_separator'   => '.',
354
				'number_decimals'     => 2,
355
			),
356
		),
357
		'RUB' => array(
358
			'admin_label' => sprintf( __('Russian Rubles (%1$s)', 'give'), '&#8381;'),
0 ignored issues
show
Expected 1 spaces before closing bracket; 0 found
Loading history...
Expected 1 spaces after opening bracket; 0 found
Loading history...
359
			'symbol'      => '&#8381;',
360
			'setting'     => array(
361
				'currency_position'   => 'before',
362
				'thousands_separator' => '.',
363
				'decimal_separator'   => ',',
364
				'number_decimals'     => 2,
365
			),
366
		),
367
		'AED' => array(
368
			'admin_label' => sprintf( __('United Arab Emirates dirham (%1$s)', 'give'), '&#x62f;.&#x625;'),
0 ignored issues
show
Expected 1 spaces before closing bracket; 0 found
Loading history...
Expected 1 spaces after opening bracket; 0 found
Loading history...
369
			'symbol'      => '&#x62f;.&#x625;',
370
			'setting'     => array(
371
				'currency_position'   => 'before',
372
				'thousands_separator' => ',',
373
				'decimal_separator'   => '.',
374
				'number_decimals'     => 2,
375
			),
376
		),
377
		'AMD' => array(
378
			'admin_label' => sprintf( __('Armenian dram (%1$s)', 'give'), 'AMD'),
0 ignored issues
show
Expected 1 spaces before closing bracket; 0 found
Loading history...
Expected 1 spaces after opening bracket; 0 found
Loading history...
379
			'symbol'      => 'AMD', // Add backward compatibility. Using AMD in place of &#1423;
380
			'setting'     => array(
381
				'currency_position'   => 'before',
382
				'thousands_separator' => ',',
383
				'decimal_separator'   => '.',
384
				'number_decimals'     => 2,
385
			),
386
		),
387
		'ANG' => array(
388
			'admin_label' => sprintf( __('Netherlands Antillean guilder (%1$s)', 'give'), '&#402;'),
0 ignored issues
show
Expected 1 spaces before closing bracket; 0 found
Loading history...
Expected 1 spaces after opening bracket; 0 found
Loading history...
389
			'symbol'      => '&#402;',
390
			'setting'     => array(
391
				'currency_position'   => 'before',
392
				'thousands_separator' => '.',
393
				'decimal_separator'   => ',',
394
				'number_decimals'     => 2,
395
			),
396
		),
397
		'ARS' => array(
398
			'admin_label' => sprintf( __('Argentine peso (%1$s)', 'give'), '&#36;'),
0 ignored issues
show
Expected 1 spaces before closing bracket; 0 found
Loading history...
Expected 1 spaces after opening bracket; 0 found
Loading history...
399
			'symbol'      => '&#36;',
400
			'setting'     => array(
401
				'currency_position'   => 'before',
402
				'thousands_separator' => '.',
403
				'decimal_separator'   => ',',
404
				'number_decimals'     => 2,
405
			),
406
		),
407
		'AWG' => array(
408
			'admin_label' => sprintf( __( 'Aruban florin (%1$s)', 'give' ), '&#402;' ),
409
			'symbol'      => '&#402;',
410
			'setting'     => array(
411
				'currency_position'   => 'before',
412
				'thousands_separator' => ',',
413
				'decimal_separator'   => '.',
414
				'number_decimals'     => 2,
415
			),
416
		),
417
		'BAM' => array(
418
			'admin_label' => sprintf( __( 'Bosnia and Herzegovina convertible mark (%1$s)', 'give' ), '&#75;&#77;' ),
419
			'symbol'      => '&#75;&#77;',
420
			'setting'     => array(
421
				'currency_position'   => 'before',
422
				'thousands_separator' => ',',
423
				'decimal_separator'   => '.',
424
				'number_decimals'     => 2,
425
			),
426
		),
427
		'BDT' => array(
428
			'admin_label' => sprintf( __( 'Bangladeshi taka (%1$s)', 'give' ), '&#2547;' ),
429
			'symbol'      => '&#2547;',
430
			'setting'     => array(
431
				'currency_position'   => 'before',
432
				'thousands_separator' => ',',
433
				'decimal_separator'   => '.',
434
				'number_decimals'     => 2,
435
			),
436
		),
437
		'BHD' => array(
438
			'admin_label' => sprintf( __( 'Bahraini dinar (%1$s)', 'give' ), '.&#x62f;.&#x628;' ),
439
			'symbol'      => '.&#x62f;.&#x628;',
440
			'setting'     => array(
441
				'currency_position'   => 'before',
442
				'thousands_separator' => ',',
443
				'decimal_separator'   => '.',
444
				'number_decimals'     => 3,
445
			),
446
		),
447
		'BMD' => array(
448
			'admin_label' => sprintf( __( 'Bermudian dollar (%1$s)', 'give' ), '&#66;&#68;&#36;' ),
449
			'symbol'      => '&#66;&#68;&#36;',
450
			'setting'     => array(
451
				'currency_position'   => 'before',
452
				'thousands_separator' => ',',
453
				'decimal_separator'   => '.',
454
				'number_decimals'     => 2,
455
			),
456
		),
457
		'BND' => array(
458
			'admin_label' => sprintf( __( 'Brunei dollar (%1$s)', 'give' ), '&#66;&#36;' ),
459
			'symbol'      => '&#66;&#36;',
460
			'setting'     => array(
461
				'currency_position'   => 'before',
462
				'thousands_separator' => ',',
463
				'decimal_separator'   => '.',
464
				'number_decimals'     => 2,
465
			),
466
		),
467
		'BOB' => array(
468
			'admin_label' => sprintf( __( 'Bolivian boliviano (%1$s)', 'give' ), '&#66;&#115;&#46;' ),
469
			'symbol'      => '&#66;&#115;&#46;',
470
			'setting'     => array(
471
				'currency_position'   => 'before',
472
				'thousands_separator' => ',',
473
				'decimal_separator'   => '.',
474
				'number_decimals'     => 2,
475
			),
476
		),
477
		'BSD' => array(
478
			'admin_label' => sprintf( __( 'Bahamian dollar (%1$s)', 'give' ), '&#66;&#36;' ),
479
			'symbol'      => '&#66;&#36;',
480
			'setting'     => array(
481
				'currency_position'   => 'before',
482
				'thousands_separator' => ',',
483
				'decimal_separator'   => '.',
484
				'number_decimals'     => 2,
485
			),
486
		),
487
		'BWP' => array(
488
			'admin_label' => sprintf( __( 'Botswana pula (%1$s)', 'give' ), '&#80;' ),
489
			'symbol'      => '&#80;',
490
			'setting'     => array(
491
				'currency_position'   => 'before',
492
				'thousands_separator' => ',',
493
				'decimal_separator'   => '.',
494
				'number_decimals'     => 2,
495
			),
496
		),
497
		'BZD' => array(
498
			'admin_label' => sprintf( __( 'Belizean dollar (%1$s)', 'give' ), '&#66;&#90;&#36;' ),
499
			'symbol'      => '&#66;&#90;&#36;',
500
			'setting'     => array(
501
				'currency_position'   => 'before',
502
				'thousands_separator' => ',',
503
				'decimal_separator'   => '.',
504
				'number_decimals'     => 2,
505
			),
506
		),
507
		'CLP' => array(
508
			'admin_label' => sprintf( __( 'Chilean peso (%1$s)', 'give' ), '&#36;' ),
509
			'symbol'      => '&#36;',
510
			'setting'     => array(
511
				'currency_position'   => 'before',
512
				'thousands_separator' => '.',
513
				'decimal_separator'   => '',
514
				'number_decimals'     => 0,
515
			),
516
		),
517
		'CNY' => array(
518
			'admin_label' => sprintf( __( 'Chinese yuan (%1$s)', 'give' ), '&yen;' ),
519
			'symbol'      => '&yen;',
520
			'setting'     => array(
521
				'currency_position'   => 'before',
522
				'thousands_separator' => ',',
523
				'decimal_separator'   => '.',
524
				'number_decimals'     => 2,
525
			),
526
		),
527
		'COP' => array(
528
			'admin_label' => sprintf( __( 'Colombian peso (%1$s)', 'give' ), '&#36;' ),
529
			'symbol'      => '&#36;',
530
			'setting'     => array(
531
				'currency_position'   => 'before',
532
				'thousands_separator' => '.',
533
				'decimal_separator'   => ',',
534
				'number_decimals'     => 2,
535
			),
536
		),
537
		'CRC' => array(
538
			'admin_label' => sprintf( __( 'Costa Rican colón (%1$s)', 'give' ), '&#8353;' ),
539
			'symbol'      => '&#8353;',
540
			'setting'     => array(
541
				'currency_position'   => 'before',
542
				'thousands_separator' => '.',
543
				'decimal_separator'   => ',',
544
				'number_decimals'     => 2,
545
			),
546
		),
547
		'CUC' => array(
548
			'admin_label' => sprintf( __( 'Cuban convertible peso (%1$s)', 'give' ), '&#8369;' ),
549
			'symbol'      => '&#8369;',
550
			'setting'     => array(
551
				'currency_position'   => 'before',
552
				'thousands_separator' => ',',
553
				'decimal_separator'   => '.',
554
				'number_decimals'     => 2,
555
			),
556
		),
557
		'CUP' => array(
558
			'admin_label' => sprintf( __( 'Cuban convertible peso (%1$s)', 'give' ), '&#8369;' ),
559
			'symbol'      => '&#8369;',
560
			'setting'     => array(
561
				'currency_position'   => 'before',
562
				'thousands_separator' => ',',
563
				'decimal_separator'   => '.',
564
				'number_decimals'     => 2,
565
			),
566
		),
567
		'DOP' => array(
568
			'admin_label' => sprintf( __( 'Dominican peso (%1$s)', 'give' ), '&#82;&#68;&#36;' ),
569
			'symbol'      => '&#82;&#68;&#36;',
570
			'setting'     => array(
571
				'currency_position'   => 'before',
572
				'thousands_separator' => ',',
573
				'decimal_separator'   => '.',
574
				'number_decimals'     => 2,
575
			),
576
		),
577
		'EGP' => array(
578
			'admin_label' => sprintf( __( 'Egyptian pound (%1$s)', 'give' ), '&#69;&pound;' ),
579
			'symbol'      => '&#69;&pound;',
580
			'setting'     => array(
581
				'currency_position'   => 'before',
582
				'thousands_separator' => ',',
583
				'decimal_separator'   => '.',
584
				'number_decimals'     => 2,
585
			),
586
		),
587
		'GIP' => array(
588
			'admin_label' => sprintf( __( 'Gibraltar pound (%1$s)', 'give' ), '&pound;' ),
589
			'symbol'      => '&pound;',
590
			'setting'     => array(
591
				'currency_position'   => 'before',
592
				'thousands_separator' => ',',
593
				'decimal_separator'   => '.',
594
				'number_decimals'     => 2,
595
			),
596
		),
597
		'GTQ' => array(
598
			'admin_label' => sprintf( __( 'Guatemalan quetzal (%1$s)', 'give' ), '&#81;' ),
599
			'symbol'      => '&#81;',
600
			'setting'     => array(
601
				'currency_position'   => 'before',
602
				'thousands_separator' => ',',
603
				'decimal_separator'   => '.',
604
				'number_decimals'     => 2,
605
			),
606
		),
607
		'HNL' => array(
608
			'admin_label' => sprintf( __( 'Honduran lempira (%1$s)', 'give' ), '&#76;' ),
609
			'symbol'      => '&#76;',
610
			'setting'     => array(
611
				'currency_position'   => 'before',
612
				'thousands_separator' => ',',
613
				'decimal_separator'   => '.',
614
				'number_decimals'     => 2,
615
			),
616
		),
617
		'HRK' => array(
618
			'admin_label' => sprintf( __( 'Croatian kuna (%1$s)', 'give' ), '&#107;&#110;' ),
619
			'symbol'      => '&#107;&#110;',
620
			'setting'     => array(
621
				'currency_position'   => 'after',
622
				'thousands_separator' => '.',
623
				'decimal_separator'   => ',',
624
				'number_decimals'     => 2,
625
			),
626
		),
627
		'IDR' => array(
628
			'admin_label' => sprintf( __( 'Indonesian rupiah (%1$s)', 'give' ), '&#82;&#112;' ),
629
			'symbol'      => '&#82;&#112;',
630
			'setting'     => array(
631
				'currency_position'   => 'before',
632
				'thousands_separator' => '.',
633
				'decimal_separator'   => ',',
634
				'number_decimals'     => 2,
635
			),
636
		),
637
		'ISK' => array(
638
			'admin_label' => sprintf( __( 'Icelandic króna (%1$s)', 'give' ), '&#107;&#114;' ),
639
			'symbol'      => '&#107;&#114;',
640
			'setting'     => array(
641
				'currency_position'   => 'after',
642
				'thousands_separator' => '.',
643
				'decimal_separator'   => '',
644
				'number_decimals'     => 0,
645
			),
646
		),
647
		'JMD' => array(
648
			'admin_label' => sprintf( __( 'Jamaican dollar (%1$s)', 'give' ), '&#106;&#36;' ),
649
			'symbol'      => '&#106;&#36;',
650
			'setting'     => array(
651
				'currency_position'   => 'before',
652
				'thousands_separator' => ',',
653
				'decimal_separator'   => '.',
654
				'number_decimals'     => 2,
655
			),
656
		),
657
		'JOD' => array(
658
			'admin_label' => sprintf( __( 'Jordanian dinar (%1$s)', 'give' ), '&#x62f;.&#x627;' ),
659
			'symbol'      => '&#x62f;.&#x627;',
660
			'setting'     => array(
661
				'currency_position'   => 'before',
662
				'thousands_separator' => ',',
663
				'decimal_separator'   => '.',
664
				'number_decimals'     => 3,
665
			),
666
		),
667
		'KES' => array(
668
			'admin_label' => sprintf( __( 'Kenyan shilling (%1$s)', 'give' ), '&#75;&#83;&#104;' ),
669
			'symbol'      => '&#75;&#83;&#104;',
670
			'setting'     => array(
671
				'currency_position'   => 'before',
672
				'thousands_separator' => ',',
673
				'decimal_separator'   => '.',
674
				'number_decimals'     => 2,
675
			),
676
		),
677
		'KWD' => array(
678
			'admin_label' => sprintf( __( 'Kuwaiti dinar (%1$s)', 'give' ), '&#x62f;.&#x643;' ),
679
			'symbol'      => '&#x62f;.&#x643;',
680
			'setting'     => array(
681
				'currency_position'   => 'before',
682
				'thousands_separator' => ',',
683
				'decimal_separator'   => '.',
684
				'number_decimals'     => 3,
685
			),
686
		),
687
		'KYD' => array(
688
			'admin_label' => sprintf( __( 'Cayman Islands dollar (%1$s)', 'give' ), '&#75;&#89;&#36;' ),
689
			'symbol'      => '&#75;&#89;&#36;',
690
			'setting'     => array(
691
				'currency_position'   => 'before',
692
				'thousands_separator' => ',',
693
				'decimal_separator'   => '.',
694
				'number_decimals'     => 2,
695
			),
696
		),
697
		'MKD' => array(
698
			'admin_label' => sprintf( __( 'Macedonian denar (%1$s)', 'give' ), '&#x434;&#x435;&#x43d;' ),
699
			'symbol'      => '&#x434;&#x435;&#x43d;',
700
			'setting'     => array(
701
				'currency_position'   => 'before',
702
				'thousands_separator' => ',',
703
				'decimal_separator'   => '.',
704
				'number_decimals'     => 2,
705
			),
706
		),
707
		'NPR' => array(
708
			'admin_label' => sprintf( __( 'Nepalese rupee (%1$s)', 'give' ), '&#8360;' ),
709
			'symbol'      => '&#8360;',
710
			'setting'     => array(
711
				'currency_position'   => 'before',
712
				'thousands_separator' => ',',
713
				'decimal_separator'   => '.',
714
				'number_decimals'     => 2,
715
			),
716
		),
717
		'OMR' => array(
718
			'admin_label' => sprintf( __( 'Omani rial (%1$s)', 'give' ), '&#x631;.&#x639;&#46;' ),
719
			'symbol'      => '&#x631;.&#x639;&#46;',
720
			'setting'     => array(
721
				'currency_position'   => 'before',
722
				'thousands_separator' => ',',
723
				'decimal_separator'   => '.',
724
				'number_decimals'     => 3,
725
			),
726
		),
727
		'PEN' => array(
728
			'admin_label' => sprintf( __( 'Peruvian nuevo sol (%1$s)', 'give' ), 'S/.' ),
729
			'symbol'      => 'S/.',
730
			'setting'     => array(
731
				'currency_position'   => 'before',
732
				'thousands_separator' => ',',
733
				'decimal_separator'   => '.',
734
				'number_decimals'     => 2,
735
			),
736
		),
737
		'PKR' => array(
738
			'admin_label' => sprintf( __( 'Pakistani rupee (%1$s)', 'give' ), '&#8360;' ),
739
			'symbol'      => '&#8360;',
740
			'setting'     => array(
741
				'currency_position'   => 'before',
742
				'thousands_separator' => ',',
743
				'decimal_separator'   => '.',
744
				'number_decimals'     => 2,
745
			),
746
		),
747
		'RON' => array(
748
			'admin_label' => sprintf( __( 'Romanian leu (%1$s)', 'give' ), '&#76;' ),
749
			'symbol'      => '&#76;',
750
			'setting'     => array(
751
				'currency_position'   => 'after',
752
				'thousands_separator' => '.',
753
				'decimal_separator'   => ',',
754
				'number_decimals'     => 2,
755
			),
756
		),
757
		'SAR' => array(
758
			'admin_label' => sprintf( __( 'Saudi riyal (%1$s)', 'give' ), '&#x631;.&#x633;' ),
759
			'symbol'      => '&#x631;.&#x633;',
760
			'setting'     => array(
761
				'currency_position'   => 'before',
762
				'thousands_separator' => ',',
763
				'decimal_separator'   => '.',
764
				'number_decimals'     => 2,
765
			),
766
		),
767
		'SZL' => array(
768
			'admin_label' => sprintf( __( 'Swazi lilangeni (%1$s)', 'give' ), '&#76;'),
0 ignored issues
show
Expected 1 spaces before closing bracket; 0 found
Loading history...
769
			'symbol'      => '&#76;',
770
			'setting'     => array(
771
				'currency_position'   => 'before',
772
				'thousands_separator' => ',',
773
				'decimal_separator'   => '.',
774
				'number_decimals'     => 2,
775
			),
776
		),
777
		'TOP' => array(
778
			'admin_label' => sprintf( __( 'Tongan paʻanga (%1$s)', 'give' ), '&#84;&#36;'),
0 ignored issues
show
Expected 1 spaces before closing bracket; 0 found
Loading history...
779
			'symbol'      => '&#84;&#36;',
780
			'setting'     => array(
781
				'currency_position'   => 'before',
782
				'thousands_separator' => ',',
783
				'decimal_separator'   => '.',
784
				'number_decimals'     => 2,
785
			),
786
		),
787
		'TZS' => array(
788
			'admin_label' => sprintf( __( 'Tanzanian shilling (%1$s)', 'give' ), '&#84;&#83;&#104;'),
0 ignored issues
show
Expected 1 spaces before closing bracket; 0 found
Loading history...
789
			'symbol'      => '&#84;&#83;&#104;',
790
			'setting'     => array(
791
				'currency_position'   => 'before',
792
				'thousands_separator' => ',',
793
				'decimal_separator'   => '.',
794
				'number_decimals'     => 2,
795
			),
796
		),
797
		'UAH' => array(
798
			'admin_label' => sprintf( __( 'Ukrainian hryvnia (%1$s)', 'give' ), '&#8372;'),
0 ignored issues
show
Expected 1 spaces before closing bracket; 0 found
Loading history...
799
			'symbol'      => '&#8372;',
800
			'setting'     => array(
801
				'currency_position'   => 'before',
802
				'thousands_separator' => ' ',
803
				'decimal_separator'   => ',',
804
				'number_decimals'     => 2,
805
			),
806
		),
807
		'UYU' => array(
808
			'admin_label' => sprintf( __( 'Uruguayan peso (%1$s)', 'give' ), '&#36;&#85;'),
0 ignored issues
show
Expected 1 spaces before closing bracket; 0 found
Loading history...
809
			'symbol'      => '&#36;&#85;',
810
			'setting'     => array(
811
				'currency_position'   => 'before',
812
				'thousands_separator' => '.',
813
				'decimal_separator'   => ',',
814
				'number_decimals'     => 2,
815
			),
816
		),
817
		'VEF' => array(
818
			'admin_label' => sprintf( __( 'Venezuelan bolívar (%1$s)', 'give' ), '&#66;&#115;'),
0 ignored issues
show
Expected 1 spaces before closing bracket; 0 found
Loading history...
819
			'symbol'      => '&#66;&#115;',
820
			'setting'     => array(
821
				'currency_position'   => 'before',
822
				'thousands_separator' => '.',
823
				'decimal_separator'   => ',',
824
				'number_decimals'     => 2,
825
			),
826
		),
827
		'XCD' => array(
828
			'admin_label' => sprintf( __( 'East Caribbean dollar (%1$s)', 'give' ), '&#69;&#67;&#36;'),
0 ignored issues
show
Expected 1 spaces before closing bracket; 0 found
Loading history...
829
			'symbol'      => '&#69;&#67;&#36;',
830
			'setting'     => array(
831
				'currency_position'   => 'before',
832
				'thousands_separator' => ',',
833
				'decimal_separator'   => '.',
834
				'number_decimals'     => 2,
835
			),
836
		),
837
		'AFN' => array(
838
			'admin_label' => sprintf( __('Afghan afghani (%1$s)', 'give'), '&#x60b;'),
0 ignored issues
show
Expected 1 spaces before closing bracket; 0 found
Loading history...
Expected 1 spaces after opening bracket; 0 found
Loading history...
839
			'symbol'      => '&#x60b;',
840
			'setting'     => array(
841
				'currency_position'   => 'before',
842
				'thousands_separator' => ',',
843
				'decimal_separator'   => '.',
844
				'number_decimals'     => 2,
845
			),
846
		),
847
		'ALL' => array(
848
			'admin_label' => sprintf( __('Albanian lek (%1$s)', 'give'), 'L'),
0 ignored issues
show
Expected 1 spaces before closing bracket; 0 found
Loading history...
Expected 1 spaces after opening bracket; 0 found
Loading history...
849
			'symbol'      => 'L',
850
			'setting'     => array(
851
				'currency_position'   => 'after',
852
				'thousands_separator' => '.',
853
				'decimal_separator'   => ',',
854
				'number_decimals'     => 2,
855
			),
856
		),
857
		'AOA' => array(
858
			'admin_label' => sprintf( __('Angolan kwanza (%1$s)', 'give'), 'Kz'),
0 ignored issues
show
Expected 1 spaces before closing bracket; 0 found
Loading history...
Expected 1 spaces after opening bracket; 0 found
Loading history...
859
			'symbol'      => 'Kz',
860
			'setting'     => array(
861
				'currency_position'   => 'before',
862
				'thousands_separator' => ',',
863
				'decimal_separator'   => '.',
864
				'number_decimals'     => 2,
865
			),
866
		),
867
		'AZN' => array(
868
			'admin_label' => sprintf( __('Azerbaijani manat (%1$s)', 'give'), 'AZN'),
0 ignored issues
show
Expected 1 spaces before closing bracket; 0 found
Loading history...
Expected 1 spaces after opening bracket; 0 found
Loading history...
869
			'symbol'      => 'AZN',
870
			'setting'     => array(
871
				'currency_position'   => 'after',
872
				'thousands_separator' => ' ',
873
				'decimal_separator'   => ',',
874
				'number_decimals'     => 2,
875
			),
876
		),
877
		'BBD' => array(
878
			'admin_label' => sprintf( __('Barbadian dollar (%1$s)', 'give'), '&#36;'),
0 ignored issues
show
Expected 1 spaces before closing bracket; 0 found
Loading history...
Expected 1 spaces after opening bracket; 0 found
Loading history...
879
			'symbol'      => '&#36;',
880
			'setting'     => array(
881
				'currency_position'   => 'before',
882
				'thousands_separator' => ',',
883
				'decimal_separator'   => '.',
884
				'number_decimals'     => 2,
885
			),
886
		),
887
		'BGN' => array(
888
			'admin_label' => sprintf( __('Bulgarian lev (%1$s)', 'give'), '&#1083;&#1074;.'),
0 ignored issues
show
Expected 1 spaces before closing bracket; 0 found
Loading history...
Expected 1 spaces after opening bracket; 0 found
Loading history...
889
			'symbol'      => '&#1083;&#1074;.',
890
			'setting'     => array(
891
				'currency_position'   => 'after',
892
				'thousands_separator' => ' ',
893
				'decimal_separator'   => ',',
894
				'number_decimals'     => 2,
895
			),
896
		),
897
		'BIF' => array(
898
			'admin_label' => sprintf( __('Burundian franc (%1$s)', 'give'), 'Fr'),
0 ignored issues
show
Expected 1 spaces before closing bracket; 0 found
Loading history...
Expected 1 spaces after opening bracket; 0 found
Loading history...
899
			'symbol'      => 'Fr',
900
			'setting'     => array(
901
				'currency_position'   => 'after',
902
				'thousands_separator' => ',',
903
				'decimal_separator'   => '.',
904
				'number_decimals'     => 0,
905
			),
906
		),
907
		'BTC' => array(
908
			'admin_label' => sprintf( __('Bitcoin (%1$s)', 'give'), '&#3647;'),
0 ignored issues
show
Expected 1 spaces before closing bracket; 0 found
Loading history...
Expected 1 spaces after opening bracket; 0 found
Loading history...
909
			'symbol'      => '&#3647;',
910
			'setting'     => array(
911
				'currency_position'   => 'after',
912
				'thousands_separator' => ',',
913
				'decimal_separator'   => '.',
914
				'number_decimals'     => 8,
915
			),
916
		),
917
		'BTN' => array(
918
			'admin_label' => sprintf( __('Bhutanese ngultrum (%1$s)', 'give'), 'Nu.'),
0 ignored issues
show
Expected 1 spaces before closing bracket; 0 found
Loading history...
Expected 1 spaces after opening bracket; 0 found
Loading history...
919
			'symbol'      => 'Nu.',
920
			'setting'     => array(
921
				'currency_position'   => 'before',
922
				'thousands_separator' => ',',
923
				'decimal_separator'   => '.',
924
				'number_decimals'     => 1,
925
			),
926
		),
927
		'BYR' => array(
928
			'admin_label' => sprintf( __('Belarusian ruble (old) (%1$s)', 'give'), 'Br'),
0 ignored issues
show
Expected 1 spaces before closing bracket; 0 found
Loading history...
Expected 1 spaces after opening bracket; 0 found
Loading history...
929
			'symbol'      => 'Br',
930
			'setting'     => array(
931
				'currency_position'   => 'after',
932
				'thousands_separator' => ' ',
933
				'decimal_separator'   => ',',
934
				'number_decimals'     => 2,
935
			),
936
		),
937
		'BYN' => array(
938
			'admin_label' => sprintf( __('Belarusian ruble (%1$s)', 'give'), 'Br'),
0 ignored issues
show
Expected 1 spaces before closing bracket; 0 found
Loading history...
Expected 1 spaces after opening bracket; 0 found
Loading history...
939
			'symbol'      => 'Br',
940
			'setting'     => array(
941
				'currency_position'   => 'after',
942
				'thousands_separator' => ' ',
943
				'decimal_separator'   => ',',
944
				'number_decimals'     => 2,
945
			),
946
		),
947
		'CDF' => array(
948
			'admin_label' => sprintf( __('Congolese franc (%1$s)', 'give'), 'Fr'),
0 ignored issues
show
Expected 1 spaces before closing bracket; 0 found
Loading history...
Expected 1 spaces after opening bracket; 0 found
Loading history...
949
			'symbol'      => 'Fr',
950
			'setting'     => array(
951
				'currency_position'   => 'after',
952
				'thousands_separator' => ',',
953
				'decimal_separator'   => '.',
954
				'number_decimals'     => 2,
955
			),
956
		),
957
		'CVE' => array(
958
			'admin_label' => sprintf( __('Cape Verdean escudo (%1$s)', 'give'), '&#36;'),
0 ignored issues
show
Expected 1 spaces before closing bracket; 0 found
Loading history...
Expected 1 spaces after opening bracket; 0 found
Loading history...
959
			'symbol'      => '&#36;',
960
			'setting'     => array(
961
				'currency_position'   => 'before',
962
				'thousands_separator' => ',',
963
				'decimal_separator'   => '.',
964
				'number_decimals'     => 2,
965
			),
966
		),
967
		'DJF' => array(
968
			'admin_label' => sprintf( __('Djiboutian franc (%1$s)', 'give'), 'Fr'),
0 ignored issues
show
Expected 1 spaces before closing bracket; 0 found
Loading history...
Expected 1 spaces after opening bracket; 0 found
Loading history...
969
			'symbol'      => 'Fr',
970
			'setting'     => array(
971
				'currency_position'   => 'after',
972
				'thousands_separator' => ',',
973
				'decimal_separator'   => '.',
974
				'number_decimals'     => 0,
975
			),
976
		),
977
		'DZD' => array(
978
			'admin_label' => sprintf( __('Algerian dinar (%1$s)', 'give'), '&#x62f;.&#x62c;'),
0 ignored issues
show
Expected 1 spaces before closing bracket; 0 found
Loading history...
Expected 1 spaces after opening bracket; 0 found
Loading history...
979
			'symbol'      => '&#x62f;.&#x62c;',
980
			'setting'     => array(
981
				'currency_position'   => 'before',
982
				'thousands_separator' => ',',
983
				'decimal_separator'   => '.',
984
				'number_decimals'     => 2,
985
			),
986
		),
987
		'ERN' => array(
988
			'admin_label' => sprintf( __('Eritrean nakfa (%1$s)', 'give'), 'Nfk'),
0 ignored issues
show
Expected 1 spaces before closing bracket; 0 found
Loading history...
Expected 1 spaces after opening bracket; 0 found
Loading history...
989
			'symbol'      => 'Nfk',
990
			'setting'     => array(
991
				'currency_position'   => 'after',
992
				'thousands_separator' => ',',
993
				'decimal_separator'   => '.',
994
				'number_decimals'     => 2,
995
			),
996
		),
997
		'ETB' => array(
998
			'admin_label' => sprintf( __('Ethiopian birr (%1$s)', 'give'), 'Br'),
0 ignored issues
show
Expected 1 spaces before closing bracket; 0 found
Loading history...
Expected 1 spaces after opening bracket; 0 found
Loading history...
999
			'symbol'      => 'Br',
1000
			'setting'     => array(
1001
				'currency_position'   => 'before',
1002
				'thousands_separator' => ',',
1003
				'decimal_separator'   => '.',
1004
				'number_decimals'     => 2,
1005
			),
1006
		),
1007
		'FJD' => array(
1008
			'admin_label' => sprintf( __('Fijian dollar (%1$s)', 'give'), '&#36;'),
0 ignored issues
show
Expected 1 spaces before closing bracket; 0 found
Loading history...
Expected 1 spaces after opening bracket; 0 found
Loading history...
1009
			'symbol'      => '&#36;',
1010
			'setting'     => array(
1011
				'currency_position'   => 'before',
1012
				'thousands_separator' => ',',
1013
				'decimal_separator'   => '.',
1014
				'number_decimals'     => 2,
1015
			),
1016
		),
1017
		'FKP' => array(
1018
			'admin_label' => sprintf( __('Falkland Islands pound (%1$s)', 'give'), '&pound;'),
0 ignored issues
show
Expected 1 spaces before closing bracket; 0 found
Loading history...
Expected 1 spaces after opening bracket; 0 found
Loading history...
1019
			'symbol'      => '&pound;',
1020
			'setting'     => array(
1021
				'currency_position'   => 'before',
1022
				'thousands_separator' => ',',
1023
				'decimal_separator'   => '.',
1024
				'number_decimals'     => 2,
1025
			),
1026
		),
1027
		'GEL' => array(
1028
			'admin_label' => sprintf( __('Georgian lari (%1$s)', 'give'), '&#x20be;'),
0 ignored issues
show
Expected 1 spaces before closing bracket; 0 found
Loading history...
Expected 1 spaces after opening bracket; 0 found
Loading history...
1029
			'symbol'      => '&#x20be;',
1030
			'setting'     => array(
1031
				'currency_position'   => 'after',
1032
				'thousands_separator' => ' ',
1033
				'decimal_separator'   => ',',
1034
				'number_decimals'     => 2,
1035
			),
1036
		),
1037
		'GGP' => array(
1038
			'admin_label' => sprintf( __('Guernsey pound (%1$s)', 'give'), '&pound;'),
0 ignored issues
show
Expected 1 spaces before closing bracket; 0 found
Loading history...
Expected 1 spaces after opening bracket; 0 found
Loading history...
1039
			'symbol'      => '&pound;',
1040
			'setting'     => array(
1041
				'currency_position'   => 'before',
1042
				'thousands_separator' => ',',
1043
				'decimal_separator'   => '.',
1044
				'number_decimals'     => 2,
1045
			),
1046
		),
1047
		'GHS' => array(
1048
			'admin_label' => sprintf( __('Ghana cedi (%1$s)', 'give'), '&#x20b5;'),
0 ignored issues
show
Expected 1 spaces before closing bracket; 0 found
Loading history...
Expected 1 spaces after opening bracket; 0 found
Loading history...
1049
			'symbol'      => '&#x20b5;',
1050
			'setting'     => array(
1051
				'currency_position'   => 'before',
1052
				'thousands_separator' => ',',
1053
				'decimal_separator'   => '.',
1054
				'number_decimals'     => 2,
1055
			),
1056
		),
1057
		'GMD' => array(
1058
			'admin_label' => sprintf( __('Gambian dalasi (%1$s)', 'give'), 'D'),
0 ignored issues
show
Expected 1 spaces before closing bracket; 0 found
Loading history...
Expected 1 spaces after opening bracket; 0 found
Loading history...
1059
			'symbol'      => 'D',
1060
			'setting'     => array(
1061
				'currency_position'   => 'after',
1062
				'thousands_separator' => ',',
1063
				'decimal_separator'   => '.',
1064
				'number_decimals'     => 2,
1065
			),
1066
		),
1067
		'GNF' => array(
1068
			'admin_label' => sprintf( __('Guinean franc (%1$s)', 'give'), 'Fr'),
0 ignored issues
show
Expected 1 spaces before closing bracket; 0 found
Loading history...
Expected 1 spaces after opening bracket; 0 found
Loading history...
1069
			'symbol'      => 'Fr',
1070
			'setting'     => array(
1071
				'currency_position'   => 'after',
1072
				'thousands_separator' => ',',
1073
				'decimal_separator'   => '.',
1074
				'number_decimals'     => 0,
1075
			),
1076
		),
1077
		'GYD' => array(
1078
			'admin_label' => sprintf( __('Guyanese dollar (%1$s)', 'give'), '&#36;'),
0 ignored issues
show
Expected 1 spaces before closing bracket; 0 found
Loading history...
Expected 1 spaces after opening bracket; 0 found
Loading history...
1079
			'symbol'      => '&#36;',
1080
			'setting'     => array(
1081
				'currency_position'   => 'before',
1082
				'thousands_separator' => ',',
1083
				'decimal_separator'   => '.',
1084
				'number_decimals'     => 2,
1085
			),
1086
		),
1087
		'HTG' => array(
1088
			'admin_label' => sprintf( __('Haitian gourde (%1$s)', 'give'), 'G'),
0 ignored issues
show
Expected 1 spaces before closing bracket; 0 found
Loading history...
Expected 1 spaces after opening bracket; 0 found
Loading history...
1089
			'symbol'      => 'G',
1090
			'setting'     => array(
1091
				'currency_position'   => 'before',
1092
				'thousands_separator' => ',',
1093
				'decimal_separator'   => '.',
1094
				'number_decimals'     => 2,
1095
			),
1096
		),
1097
		'IMP' => array(
1098
			'admin_label' => sprintf( __('Manx pound (%1$s)', 'give'), '&pound;'),
0 ignored issues
show
Expected 1 spaces before closing bracket; 0 found
Loading history...
Expected 1 spaces after opening bracket; 0 found
Loading history...
1099
			'symbol'      => '&pound;',
1100
			'setting'     => array(
1101
				'currency_position'   => 'before',
1102
				'thousands_separator' => ',',
1103
				'decimal_separator'   => '.',
1104
				'number_decimals'     => 2,
1105
			),
1106
		),
1107
		'IQD' => array(
1108
			'admin_label' => sprintf( __('Iraqi dinar (%1$s)', 'give'), '&#x639;.&#x62f;'),
0 ignored issues
show
Expected 1 spaces before closing bracket; 0 found
Loading history...
Expected 1 spaces after opening bracket; 0 found
Loading history...
1109
			'symbol'      => '&#x639;.&#x62f;',
1110
			'setting'     => array(
1111
				'currency_position'   => 'before',
1112
				'thousands_separator' => ',',
1113
				'decimal_separator'   => '.',
1114
				'number_decimals'     => 2,
1115
			),
1116
		),
1117
		'IRT' => array(
1118
			'admin_label' => sprintf( __('Iranian toman (%1$s)', 'give'), '&#x062A;&#x0648;&#x0645;&#x0627;&#x0646;'),
0 ignored issues
show
Expected 1 spaces before closing bracket; 0 found
Loading history...
Expected 1 spaces after opening bracket; 0 found
Loading history...
1119
			'symbol'      => '&#x062A;&#x0648;&#x0645;&#x0627;&#x0646;',
1120
			'setting'     => array(
1121
				'currency_position'   => 'after',
1122
				'thousands_separator' => ',',
1123
				'decimal_separator'   => '.',
1124
				'number_decimals'     => 2,
1125
			),
1126
		),
1127
		'JEP' => array(
1128
			'admin_label' => sprintf( __('Jersey pound (%1$s)', 'give'), '&pound;'),
0 ignored issues
show
Expected 1 spaces before closing bracket; 0 found
Loading history...
Expected 1 spaces after opening bracket; 0 found
Loading history...
1129
			'symbol'      => '&pound;',
1130
			'setting'     => array(
1131
				'currency_position'   => 'before',
1132
				'thousands_separator' => ',',
1133
				'decimal_separator'   => '.',
1134
				'number_decimals'     => 2,
1135
			),
1136
		),
1137
		'KGS' => array(
1138
			'admin_label' => sprintf( __('Kyrgyzstani som (%1$s)', 'give'), '&#x441;&#x43e;&#x43c;'),
0 ignored issues
show
Expected 1 spaces before closing bracket; 0 found
Loading history...
Expected 1 spaces after opening bracket; 0 found
Loading history...
1139
			'symbol'      => '&#x441;&#x43e;&#x43c;',
1140
			'setting'     => array(
1141
				'currency_position'   => 'after',
1142
				'thousands_separator' => ' ',
1143
				'decimal_separator'   => '-',
1144
				'number_decimals'     => 2,
1145
			),
1146
		),
1147
		'KHR' => array(
1148
			'admin_label' => sprintf( __('Cambodian riel (%1$s)', 'give'), '&#x17db;'),
0 ignored issues
show
Expected 1 spaces before closing bracket; 0 found
Loading history...
Expected 1 spaces after opening bracket; 0 found
Loading history...
1149
			'symbol'      => '&#x17db;',
1150
			'setting'     => array(
1151
				'currency_position'   => 'after',
1152
				'thousands_separator' => ',',
1153
				'decimal_separator'   => '.',
1154
				'number_decimals'     => 0,
1155
			),
1156
		),
1157
		'KMF' => array(
1158
			'admin_label' => sprintf( __('Comorian franc (%1$s)', 'give'), 'Fr'),
0 ignored issues
show
Expected 1 spaces before closing bracket; 0 found
Loading history...
Expected 1 spaces after opening bracket; 0 found
Loading history...
1159
			'symbol'      => 'Fr',
1160
			'setting'     => array(
1161
				'currency_position'   => 'after',
1162
				'thousands_separator' => ',',
1163
				'decimal_separator'   => '.',
1164
				'number_decimals'     => 2,
1165
			),
1166
		),
1167
		'KPW' => array(
1168
			'admin_label' => sprintf( __('North Korean won (%1$s)', 'give'), '&#x20a9;'),
0 ignored issues
show
Expected 1 spaces before closing bracket; 0 found
Loading history...
Expected 1 spaces after opening bracket; 0 found
Loading history...
1169
			'symbol'      => '&#x20a9;',
1170
			'setting'     => array(
1171
				'currency_position'   => 'before',
1172
				'thousands_separator' => ',',
1173
				'decimal_separator'   => '.',
1174
				'number_decimals'     => 0,
1175
			),
1176
		),
1177
		'KZT' => array(
1178
			'admin_label' => sprintf( __('Kazakhstani tenge (%1$s)', 'give'), 'KZT'),
0 ignored issues
show
Expected 1 spaces before closing bracket; 0 found
Loading history...
Expected 1 spaces after opening bracket; 0 found
Loading history...
1179
			'symbol'      => 'KZT',
1180
			'setting'     => array(
1181
				'currency_position'   => 'before',
1182
				'thousands_separator' => ' ',
1183
				'decimal_separator'   => '-',
1184
				'number_decimals'     => 2,
1185
			),
1186
		),
1187
		'LAK' => array(
1188
			'admin_label' => sprintf( __('Lao kip (%1$s)', 'give'), '&#8365;'),
0 ignored issues
show
Expected 1 spaces before closing bracket; 0 found
Loading history...
Expected 1 spaces after opening bracket; 0 found
Loading history...
1189
			'symbol'      => '&#8365;',
1190
			'setting'     => array(
1191
				'currency_position'   => 'after',
1192
				'thousands_separator' => ',',
1193
				'decimal_separator'   => '.',
1194
				'number_decimals'     => 0,
1195
			),
1196
		),
1197
		'LBP' => array(
1198
			'admin_label' => sprintf( __('Lebanese pound (%1$s)', 'give'), '&#x644;.&#x644;'),
0 ignored issues
show
Expected 1 spaces before closing bracket; 0 found
Loading history...
Expected 1 spaces after opening bracket; 0 found
Loading history...
1199
			'symbol'      => '&#x644;.&#x644;',
1200
			'setting'     => array(
1201
				'currency_position'   => 'before',
1202
				'thousands_separator' => ',',
1203
				'decimal_separator'   => '.',
1204
				'number_decimals'     => 2,
1205
			),
1206
		),
1207
		'LKR' => array(
1208
			'admin_label' => sprintf( __('Sri Lankan rupee (%1$s)', 'give'), '&#xdbb;&#xdd4;'),
0 ignored issues
show
Expected 1 spaces before closing bracket; 0 found
Loading history...
Expected 1 spaces after opening bracket; 0 found
Loading history...
1209
			'symbol'      => '&#xdbb;&#xdd4;',
1210
			'setting'     => array(
1211
				'currency_position'   => 'before',
1212
				'thousands_separator' => ',',
1213
				'decimal_separator'   => '.',
1214
				'number_decimals'     => 0,
1215
			),
1216
		),
1217
		'LRD' => array(
1218
			'admin_label' => sprintf( __('Liberian dollar (%1$s)', 'give'), '&#36;'),
0 ignored issues
show
Expected 1 spaces before closing bracket; 0 found
Loading history...
Expected 1 spaces after opening bracket; 0 found
Loading history...
1219
			'symbol'      => '&#36;',
1220
			'setting'     => array(
1221
				'currency_position'   => 'before',
1222
				'thousands_separator' => ',',
1223
				'decimal_separator'   => '.',
1224
				'number_decimals'     => 2,
1225
			),
1226
		),
1227
		'LSL' => array(
1228
			'admin_label' => sprintf( __('Lesotho loti (%1$s)', 'give'), 'L'),
0 ignored issues
show
Expected 1 spaces before closing bracket; 0 found
Loading history...
Expected 1 spaces after opening bracket; 0 found
Loading history...
1229
			'symbol'      => 'L',
1230
			'setting'     => array(
1231
				'currency_position'   => 'after',
1232
				'thousands_separator' => ',',
1233
				'decimal_separator'   => '.',
1234
				'number_decimals'     => 2,
1235
			),
1236
		),
1237
		'LYD' => array(
1238
			'admin_label' => sprintf( __('Libyan dinar (%1$s)', 'give'), '&#x644;.&#x62f;'),
0 ignored issues
show
Expected 1 spaces before closing bracket; 0 found
Loading history...
Expected 1 spaces after opening bracket; 0 found
Loading history...
1239
			'symbol'      => '&#x644;.&#x62f;',
1240
			'setting'     => array(
1241
				'currency_position'   => 'before',
1242
				'thousands_separator' => ',',
1243
				'decimal_separator'   => '.',
1244
				'number_decimals'     => 3,
1245
			),
1246
		),
1247
		'MDL' => array(
1248
			'admin_label' => sprintf( __('Moldovan leu (%1$s)', 'give'), 'MDL'),
0 ignored issues
show
Expected 1 spaces before closing bracket; 0 found
Loading history...
Expected 1 spaces after opening bracket; 0 found
Loading history...
1249
			'symbol'      => 'MDL',
1250
			'setting'     => array(
1251
				'currency_position'   => 'after',
1252
				'thousands_separator' => ',',
1253
				'decimal_separator'   => '.',
1254
				'number_decimals'     => 2,
1255
			),
1256
		),
1257
		'MGA' => array(
1258
			'admin_label' => sprintf( __('Malagasy ariary (%1$s)', 'give'), 'Ar'),
0 ignored issues
show
Expected 1 spaces before closing bracket; 0 found
Loading history...
Expected 1 spaces after opening bracket; 0 found
Loading history...
1259
			'symbol'      => 'Ar',
1260
			'setting'     => array(
1261
				'currency_position'   => 'before',
1262
				'thousands_separator' => ',',
1263
				'decimal_separator'   => '.',
1264
				'number_decimals'     => 0,
1265
			),
1266
		),
1267
		'MMK' => array(
1268
			'admin_label' => sprintf( __('Burmese kyat (%1$s)', 'give'), 'Ks'),
0 ignored issues
show
Expected 1 spaces before closing bracket; 0 found
Loading history...
Expected 1 spaces after opening bracket; 0 found
Loading history...
1269
			'symbol'      => 'Ks',
1270
			'setting'     => array(
1271
				'currency_position'   => 'before',
1272
				'thousands_separator' => ',',
1273
				'decimal_separator'   => '.',
1274
				'number_decimals'     => 2,
1275
			),
1276
		),
1277
		'MNT' => array(
1278
			'admin_label' => sprintf( __('Mongolian tögrög (%1$s)', 'give'), '&#x20ae;'),
0 ignored issues
show
Expected 1 spaces before closing bracket; 0 found
Loading history...
Expected 1 spaces after opening bracket; 0 found
Loading history...
1279
			'symbol'      => '&#x20ae;',
1280
			'setting'     => array(
1281
				'currency_position'   => 'before',
1282
				'thousands_separator' => ' ',
1283
				'decimal_separator'   => ',',
1284
				'number_decimals'     => 2,
1285
			),
1286
		),
1287
		'MOP' => array(
1288
			'admin_label' => sprintf( __('Macanese pataca (%1$s)', 'give'), 'P'),
0 ignored issues
show
Expected 1 spaces before closing bracket; 0 found
Loading history...
Expected 1 spaces after opening bracket; 0 found
Loading history...
1289
			'symbol'      => 'P',
1290
			'setting'     => array(
1291
				'currency_position'   => 'before',
1292
				'thousands_separator' => ',',
1293
				'decimal_separator'   => '.',
1294
				'number_decimals'     => 2,
1295
			),
1296
		),
1297
		'MRO' => array(
1298
			'admin_label' => sprintf( __('Mauritanian ouguiya (%1$s)', 'give'), 'UM'),
0 ignored issues
show
Expected 1 spaces before closing bracket; 0 found
Loading history...
Expected 1 spaces after opening bracket; 0 found
Loading history...
1299
			'symbol'      => 'UM',
1300
			'setting'     => array(
1301
				'currency_position'   => 'after',
1302
				'thousands_separator' => ',',
1303
				'decimal_separator'   => '.',
1304
				'number_decimals'     => 2,
1305
			),
1306
		),
1307
		'MUR' => array(
1308
			'admin_label' => sprintf( __('Mauritian rupee (%1$s)', 'give'), '&#x20a8;'),
0 ignored issues
show
Expected 1 spaces before closing bracket; 0 found
Loading history...
Expected 1 spaces after opening bracket; 0 found
Loading history...
1309
			'symbol'      => '&#x20a8;',
1310
			'setting'     => array(
1311
				'currency_position'   => 'before',
1312
				'thousands_separator' => ',',
1313
				'decimal_separator'   => '.',
1314
				'number_decimals'     => 2,
1315
			),
1316
		),
1317
		'MVR' => array(
1318
			'admin_label' => sprintf( __('Maldivian rufiyaa (%1$s)', 'give'), '.&#x783;'),
0 ignored issues
show
Expected 1 spaces before closing bracket; 0 found
Loading history...
Expected 1 spaces after opening bracket; 0 found
Loading history...
1319
			'symbol'      => '.&#x783;',
1320
			'setting'     => array(
1321
				'currency_position'   => 'after',
1322
				'thousands_separator' => ',',
1323
				'decimal_separator'   => '.',
1324
				'number_decimals'     => 1,
1325
			),
1326
		),
1327
		'MWK' => array(
1328
			'admin_label' => sprintf( __('Malawian kwacha (%1$s)', 'give'), 'MK'),
0 ignored issues
show
Expected 1 spaces before closing bracket; 0 found
Loading history...
Expected 1 spaces after opening bracket; 0 found
Loading history...
1329
			'symbol'      => 'MK',
1330
			'setting'     => array(
1331
				'currency_position'   => 'before',
1332
				'thousands_separator' => ',',
1333
				'decimal_separator'   => '.',
1334
				'number_decimals'     => 2,
1335
			),
1336
		),
1337
		'MZN' => array(
1338
			'admin_label' => sprintf( __('Mozambican metical (%1$s)', 'give'), 'MT'),
0 ignored issues
show
Expected 1 spaces before closing bracket; 0 found
Loading history...
Expected 1 spaces after opening bracket; 0 found
Loading history...
1339
			'symbol'      => 'MT',
1340
			'setting'     => array(
1341
				'currency_position'   => 'before',
1342
				'thousands_separator' => ',',
1343
				'decimal_separator'   => '.',
1344
				'number_decimals'     => 0,
1345
			),
1346
		),
1347
		'NAD' => array(
1348
			'admin_label' => sprintf( __('Namibian dollar (%1$s)', 'give'), '&#36;'),
0 ignored issues
show
Expected 1 spaces before closing bracket; 0 found
Loading history...
Expected 1 spaces after opening bracket; 0 found
Loading history...
1349
			'symbol'      => '&#36;',
1350
			'setting'     => array(
1351
				'currency_position'   => 'before',
1352
				'thousands_separator' => ',',
1353
				'decimal_separator'   => '.',
1354
				'number_decimals'     => 2,
1355
			),
1356
		),
1357
		'NGN' => array(
1358
			'admin_label' => sprintf( __('Nigerian naira (%1$s)', 'give'), '&#8358;'),
0 ignored issues
show
Expected 1 spaces before closing bracket; 0 found
Loading history...
Expected 1 spaces after opening bracket; 0 found
Loading history...
1359
			'symbol'      => '&#8358;',
1360
			'setting'     => array(
1361
				'currency_position'   => 'before',
1362
				'thousands_separator' => ',',
1363
				'decimal_separator'   => '.',
1364
				'number_decimals'     => 2,
1365
			),
1366
		),
1367
		'NIO' => array(
1368
			'admin_label' => sprintf( __('Nicaraguan córdoba (%1$s)', 'give'), 'C&#36;'),
0 ignored issues
show
Expected 1 spaces before closing bracket; 0 found
Loading history...
Expected 1 spaces after opening bracket; 0 found
Loading history...
1369
			'symbol'      => 'C&#36;',
1370
			'setting'     => array(
1371
				'currency_position'   => 'before',
1372
				'thousands_separator' => ',',
1373
				'decimal_separator'   => '.',
1374
				'number_decimals'     => 2,
1375
			),
1376
		),
1377
		'PAB' => array(
1378
			'admin_label' => sprintf( __('Panamanian balboa (%1$s)', 'give'), 'B/.'),
0 ignored issues
show
Expected 1 spaces before closing bracket; 0 found
Loading history...
Expected 1 spaces after opening bracket; 0 found
Loading history...
1379
			'symbol'      => 'B/.',
1380
			'setting'     => array(
1381
				'currency_position'   => 'before',
1382
				'thousands_separator' => ',',
1383
				'decimal_separator'   => '.',
1384
				'number_decimals'     => 2,
1385
			),
1386
		),
1387
		'PGK' => array(
1388
			'admin_label' => sprintf( __('Papua New Guinean kina (%1$s)', 'give'), 'K'),
0 ignored issues
show
Expected 1 spaces before closing bracket; 0 found
Loading history...
Expected 1 spaces after opening bracket; 0 found
Loading history...
1389
			'symbol'      => 'K',
1390
			'setting'     => array(
1391
				'currency_position'   => 'before',
1392
				'thousands_separator' => ',',
1393
				'decimal_separator'   => '.',
1394
				'number_decimals'     => 2,
1395
			),
1396
		),
1397
		'PRB' => array(
1398
			'admin_label' => sprintf( __('Transnistrian ruble (%1$s)', 'give'), '&#x440;.'),
0 ignored issues
show
Expected 1 spaces before closing bracket; 0 found
Loading history...
Expected 1 spaces after opening bracket; 0 found
Loading history...
1399
			'symbol'      => '&#x440;.',
1400
			'setting'     => array(
1401
				'currency_position'   => 'before',
1402
				'thousands_separator' => ',',
1403
				'decimal_separator'   => '.',
1404
				'number_decimals'     => 2,
1405
			),
1406
		),
1407
		'PYG' => array(
1408
			'admin_label' => sprintf( __('Paraguayan guaraní (%1$s)', 'give'), '&#8370;'),
0 ignored issues
show
Expected 1 spaces before closing bracket; 0 found
Loading history...
Expected 1 spaces after opening bracket; 0 found
Loading history...
1409
			'symbol'      => '&#8370;',
1410
			'setting'     => array(
1411
				'currency_position'   => 'before',
1412
				'thousands_separator' => '.',
1413
				'decimal_separator'   => ',',
1414
				'number_decimals'     => 2,
1415
			),
1416
		),
1417
		'QAR' => array(
1418
			'admin_label' => sprintf( __('Qatari riyal (%1$s)', 'give'), '&#x631;.&#x642;'),
0 ignored issues
show
Expected 1 spaces before closing bracket; 0 found
Loading history...
Expected 1 spaces after opening bracket; 0 found
Loading history...
1419
			'symbol'      => '&#x631;.&#x642;',
1420
			'setting'     => array(
1421
				'currency_position'   => 'before',
1422
				'thousands_separator' => ',',
1423
				'decimal_separator'   => '.',
1424
				'number_decimals'     => 2,
1425
			),
1426
		),
1427
		'RSD' => array(
1428
			'admin_label' => sprintf( __('Serbian dinar (%1$s)', 'give'), '&#x434;&#x438;&#x43d;.'),
0 ignored issues
show
Expected 1 spaces before closing bracket; 0 found
Loading history...
Expected 1 spaces after opening bracket; 0 found
Loading history...
1429
			'symbol'      => '&#x434;&#x438;&#x43d;.',
1430
			'setting'     => array(
1431
				'currency_position'   => 'after',
1432
				'thousands_separator' => '.',
1433
				'decimal_separator'   => ',',
1434
				'number_decimals'     => 2,
1435
			),
1436
		),
1437
		'RWF' => array(
1438
			'admin_label' => sprintf( __('Rwandan franc (%1$s)', 'give'), 'Fr'),
0 ignored issues
show
Expected 1 spaces before closing bracket; 0 found
Loading history...
Expected 1 spaces after opening bracket; 0 found
Loading history...
1439
			'symbol'      => 'Fr',
1440
			'setting'     => array(
1441
				'currency_position'   => 'before',
1442
				'thousands_separator' => ' ',
1443
				'decimal_separator'   => ',',
1444
				'number_decimals'     => 2,
1445
			),
1446
		),
1447
		'SBD' => array(
1448
			'admin_label' => sprintf( __('Solomon Islands dollar (%1$s)', 'give'), '&#36;'),
0 ignored issues
show
Expected 1 spaces before closing bracket; 0 found
Loading history...
Expected 1 spaces after opening bracket; 0 found
Loading history...
1449
			'symbol'      => '&#36;',
1450
			'setting'     => array(
1451
				'currency_position'   => 'before',
1452
				'thousands_separator' => ',',
1453
				'decimal_separator'   => '.',
1454
				'number_decimals'     => 2,
1455
			),
1456
		),
1457
		'SCR' => array(
1458
			'admin_label' => sprintf( __('Seychellois rupee (%1$s)', 'give'), '&#x20a8;'),
0 ignored issues
show
Expected 1 spaces before closing bracket; 0 found
Loading history...
Expected 1 spaces after opening bracket; 0 found
Loading history...
1459
			'symbol'      => '&#x20a8;',
1460
			'setting'     => array(
1461
				'currency_position'   => 'before',
1462
				'thousands_separator' => ',',
1463
				'decimal_separator'   => '.',
1464
				'number_decimals'     => 2,
1465
			),
1466
		),
1467
		'SDG' => array(
1468
			'admin_label' => sprintf( __('Sudanese pound (%1$s)', 'give'), '&#x62c;.&#x633;.'),
0 ignored issues
show
Expected 1 spaces before closing bracket; 0 found
Loading history...
Expected 1 spaces after opening bracket; 0 found
Loading history...
1469
			'symbol'      => '&#x62c;.&#x633;.',
1470
			'setting'     => array(
1471
				'currency_position'   => 'before',
1472
				'thousands_separator' => ',',
1473
				'decimal_separator'   => '.',
1474
				'number_decimals'     => 2,
1475
			),
1476
		),
1477
		'SHP' => array(
1478
			'admin_label' => sprintf( __('Saint Helena pound (%1$s)', 'give'), '&pound;'),
0 ignored issues
show
Expected 1 spaces before closing bracket; 0 found
Loading history...
Expected 1 spaces after opening bracket; 0 found
Loading history...
1479
			'symbol'      => '&pound;',
1480
			'setting'     => array(
1481
				'currency_position'   => 'before',
1482
				'thousands_separator' => ',',
1483
				'decimal_separator'   => '.',
1484
				'number_decimals'     => 2,
1485
			),
1486
		),
1487
		'SLL' => array(
1488
			'admin_label' => sprintf( __('Sierra Leonean leone (%1$s)', 'give'), 'Le'),
0 ignored issues
show
Expected 1 spaces before closing bracket; 0 found
Loading history...
Expected 1 spaces after opening bracket; 0 found
Loading history...
1489
			'symbol'      => 'Le',
1490
			'setting'     => array(
1491
				'currency_position'   => 'before',
1492
				'thousands_separator' => ',',
1493
				'decimal_separator'   => '.',
1494
				'number_decimals'     => 2,
1495
			),
1496
		),
1497
		'SOS' => array(
1498
			'admin_label' => sprintf( __('Somali shilling (%1$s)', 'give'), 'Sh'),
0 ignored issues
show
Expected 1 spaces before closing bracket; 0 found
Loading history...
Expected 1 spaces after opening bracket; 0 found
Loading history...
1499
			'symbol'      => 'Sh',
1500
			'setting'     => array(
1501
				'currency_position'   => 'before',
1502
				'thousands_separator' => ',',
1503
				'decimal_separator'   => '.',
1504
				'number_decimals'     => 2,
1505
			),
1506
		),
1507
		'SRD' => array(
1508
			'admin_label' => sprintf( __('Surinamese dollar (%1$s)', 'give'), '&#36;'),
0 ignored issues
show
Expected 1 spaces before closing bracket; 0 found
Loading history...
Expected 1 spaces after opening bracket; 0 found
Loading history...
1509
			'symbol'      => '&#36;',
1510
			'setting'     => array(
1511
				'currency_position'   => 'before',
1512
				'thousands_separator' => ',',
1513
				'decimal_separator'   => '.',
1514
				'number_decimals'     => 2,
1515
			),
1516
		),
1517
		'SSP' => array(
1518
			'admin_label' => sprintf( __('South Sudanese pound (%1$s)', 'give'), '&pound;'),
0 ignored issues
show
Expected 1 spaces before closing bracket; 0 found
Loading history...
Expected 1 spaces after opening bracket; 0 found
Loading history...
1519
			'symbol'      => '&pound;',
1520
			'setting'     => array(
1521
				'currency_position'   => 'before',
1522
				'thousands_separator' => ',',
1523
				'decimal_separator'   => '.',
1524
				'number_decimals'     => 2,
1525
			),
1526
		),
1527
		'STD' => array(
1528
			'admin_label' => sprintf( __('São Tomé and Príncipe dobra (%1$s)', 'give'), 'Db'),
0 ignored issues
show
Expected 1 spaces before closing bracket; 0 found
Loading history...
Expected 1 spaces after opening bracket; 0 found
Loading history...
1529
			'symbol'      => 'Db',
1530
			'setting'     => array(
1531
				'currency_position'   => 'before',
1532
				'thousands_separator' => ',',
1533
				'decimal_separator'   => '.',
1534
				'number_decimals'     => 2,
1535
			),
1536
		),
1537
		'SYP' => array(
1538
			'admin_label' => sprintf( __('Syrian pound (%1$s)', 'give'), '&#x644;.&#x633;'),
0 ignored issues
show
Expected 1 spaces before closing bracket; 0 found
Loading history...
Expected 1 spaces after opening bracket; 0 found
Loading history...
1539
			'symbol'      => '&#x644;.&#x633;',
1540
			'setting'     => array(
1541
				'currency_position'   => 'before',
1542
				'thousands_separator' => ',',
1543
				'decimal_separator'   => '.',
1544
				'number_decimals'     => 2,
1545
			),
1546
		),
1547
		'TJS' => array(
1548
			'admin_label' => sprintf( __('Tajikistani somoni (%1$s)', 'give'), '&#x405;&#x41c;'),
0 ignored issues
show
Expected 1 spaces before closing bracket; 0 found
Loading history...
Expected 1 spaces after opening bracket; 0 found
Loading history...
1549
			'symbol'      => '&#x405;&#x41c;',
1550
			'setting'     => array(
1551
				'currency_position'   => 'after',
1552
				'thousands_separator' => ' ',
1553
				'decimal_separator'   => ';',
1554
				'number_decimals'     => 2,
1555
			),
1556
		),
1557
		'TMT' => array(
1558
			'admin_label' => sprintf( __('Turkmenistan manat (%1$s)', 'give'), 'm'),
0 ignored issues
show
Expected 1 spaces before closing bracket; 0 found
Loading history...
Expected 1 spaces after opening bracket; 0 found
Loading history...
1559
			'symbol'      => 'm',
1560
			'setting'     => array(
1561
				'currency_position'   => 'after',
1562
				'thousands_separator' => ' ',
1563
				'decimal_separator'   => ',',
1564
				'number_decimals'     => 2,
1565
			),
1566
		),
1567
		'TND' => array(
1568
			'admin_label' => sprintf( __('Turkmenistan manat (%1$s)', 'give'), '&#x62f;.&#x62a;'),
0 ignored issues
show
Expected 1 spaces before closing bracket; 0 found
Loading history...
Expected 1 spaces after opening bracket; 0 found
Loading history...
1569
			'symbol'      => '&#x62f;.&#x62a;',
1570
			'setting'     => array(
1571
				'currency_position'   => 'before',
1572
				'thousands_separator' => ',',
1573
				'decimal_separator'   => '.',
1574
				'number_decimals'     => 3,
1575
			),
1576
		),
1577
		'TTD' => array(
1578
			'admin_label' => sprintf( __('Trinidad and Tobago dollar (%1$s)', 'give'), '&#36;'),
0 ignored issues
show
Expected 1 spaces before closing bracket; 0 found
Loading history...
Expected 1 spaces after opening bracket; 0 found
Loading history...
1579
			'symbol'      => '&#36;',
1580
			'setting'     => array(
1581
				'currency_position'   => 'before',
1582
				'thousands_separator' => ',',
1583
				'decimal_separator'   => '.',
1584
				'number_decimals'     => 2,
1585
			),
1586
		),
1587
		'UGX' => array(
1588
			'admin_label' => sprintf( __('Ugandan shilling (%1$s)', 'give'), 'UGX'),
0 ignored issues
show
Expected 1 spaces before closing bracket; 0 found
Loading history...
Expected 1 spaces after opening bracket; 0 found
Loading history...
1589
			'symbol'      => 'UGX',
1590
			'setting'     => array(
1591
				'currency_position'   => 'before',
1592
				'thousands_separator' => ',',
1593
				'decimal_separator'   => '.',
1594
				'number_decimals'     => 2,
1595
			),
1596
		),
1597
		'UZS' => array(
1598
			'admin_label' => sprintf( __('Uzbekistani som (%1$s)', 'give'), 'UZS'),
0 ignored issues
show
Expected 1 spaces before closing bracket; 0 found
Loading history...
Expected 1 spaces after opening bracket; 0 found
Loading history...
1599
			'symbol'      => 'UZS',
1600
			'setting'     => array(
1601
				'currency_position'   => 'after',
1602
				'thousands_separator' => ' ',
1603
				'decimal_separator'   => ',',
1604
				'number_decimals'     => 2,
1605
			),
1606
		),
1607
		'VND' => array(
1608
			'admin_label' => sprintf( __('Vietnamese đồng (%1$s)', 'give'), '&#8363;'),
0 ignored issues
show
Expected 1 spaces before closing bracket; 0 found
Loading history...
Expected 1 spaces after opening bracket; 0 found
Loading history...
1609
			'symbol'      => '&#8363;',
1610
			'setting'     => array(
1611
				'currency_position'   => 'after',
1612
				'thousands_separator' => '.',
1613
				'decimal_separator'   => ',',
1614
				'number_decimals'     => 1,
1615
			),
1616
		),
1617
		'VUV' => array(
1618
			'admin_label' => sprintf( __('Vanuatu vatu (%1$s)', 'give'), 'Vt'),
0 ignored issues
show
Expected 1 spaces before closing bracket; 0 found
Loading history...
Expected 1 spaces after opening bracket; 0 found
Loading history...
1619
			'symbol'      => 'Vt',
1620
			'setting'     => array(
1621
				'currency_position'   => 'after',
1622
				'thousands_separator' => ',',
1623
				'decimal_separator'   => '.',
1624
				'number_decimals'     => 0,
1625
			),
1626
		),
1627
		'WST' => array(
1628
			'admin_label' => sprintf( __('Samoan tālā (%1$s)', 'give'), 'T'),
0 ignored issues
show
Expected 1 spaces before closing bracket; 0 found
Loading history...
Expected 1 spaces after opening bracket; 0 found
Loading history...
1629
			'symbol'      => 'T',
1630
			'setting'     => array(
1631
				'currency_position'   => 'before',
1632
				'thousands_separator' => ',',
1633
				'decimal_separator'   => '.',
1634
				'number_decimals'     => 2,
1635
			),
1636
		),
1637
		'XAF' => array(
1638
			'admin_label' => sprintf( __('Central African CFA franc (%1$s)', 'give'), 'CFA'),
0 ignored issues
show
Expected 1 spaces before closing bracket; 0 found
Loading history...
Expected 1 spaces after opening bracket; 0 found
Loading history...
1639
			'symbol'      => 'CFA',
1640
			'setting'     => array(
1641
				'currency_position'   => 'after',
1642
				'thousands_separator' => ',',
1643
				'decimal_separator'   => '.',
1644
				'number_decimals'     => 2,
1645
			),
1646
		),
1647
		'XOF' => array(
1648
			'admin_label' => sprintf( __('West African CFA franc (%1$s)', 'give'), 'CFA'),
0 ignored issues
show
Expected 1 spaces before closing bracket; 0 found
Loading history...
Expected 1 spaces after opening bracket; 0 found
Loading history...
1649
			'symbol'      => 'CFA',
1650
			'setting'     => array(
1651
				'currency_position'   => 'after',
1652
				'thousands_separator' => ' ',
1653
				'decimal_separator'   => ',',
1654
				'number_decimals'     => 2,
1655
			),
1656
		),
1657
		'XPF' => array(
1658
			'admin_label' => sprintf( __('CFP franc (%1$s)', 'give'), 'Fr'),
0 ignored issues
show
Expected 1 spaces before closing bracket; 0 found
Loading history...
Expected 1 spaces after opening bracket; 0 found
Loading history...
1659
			'symbol'      => 'Fr',
1660
			'setting'     => array(
1661
				'currency_position'   => 'after',
1662
				'thousands_separator' => ',',
1663
				'decimal_separator'   => '.',
1664
				'number_decimals'     => 2,
1665
			),
1666
		),
1667
		'YER' => array(
1668
			'admin_label' => sprintf( __('Yemeni rial (%1$s)', 'give'), '&#xfdfc;'),
0 ignored issues
show
Expected 1 spaces before closing bracket; 0 found
Loading history...
Expected 1 spaces after opening bracket; 0 found
Loading history...
1669
			'symbol'      => '&#xfdfc;',
1670
			'setting'     => array(
1671
				'currency_position'   => 'before',
1672
				'thousands_separator' => ',',
1673
				'decimal_separator'   => '.',
1674
				'number_decimals'     => 2,
1675
			),
1676
		),
1677
		'ZMW' => array(
1678
			'admin_label' => sprintf( __('Zambian kwacha (%1$s)', 'give'), 'ZK'),
0 ignored issues
show
Expected 1 spaces before closing bracket; 0 found
Loading history...
Expected 1 spaces after opening bracket; 0 found
Loading history...
1679
			'symbol'      => 'ZK',
1680
			'setting'     => array(
1681
				'currency_position'   => 'before',
1682
				'thousands_separator' => ',',
1683
				'decimal_separator'   => '.',
1684
				'number_decimals'     => 2,
1685
			),
1686
		),
1687
	);
1688
1689
	/**
1690
	 * Filter the currencies
1691
	 * Note: you can register new currency by using this filter
1692
	 * array(
1693
	 *     'admin_label' => '',  // required
1694
	 *     'symbol'      => '',  // required
1695
	 *     'setting'     => ''   // required
1696
	 *     ....
1697
	 * )
1698
	 *
1699
	 * @since 1.8.15
1700
	 *
1701
	 * @param array $currencies
1702
	 */
1703
	return (array) apply_filters( 'give_currencies', $currencies );
1704
}
1705
1706
/**
1707
 * Get Currencies
1708
 *
1709
 * @since 1.0
1710
 *
1711
 * @param string $info Specify currency info
1712
 *
1713
 * @return array $currencies A list of the available currencies
1714
 */
1715
function give_get_currencies( $info = 'admin_label' ) {
1716
1717
	$currencies = give_get_currencies_list();
1718
1719
	// Backward compatibility: handle old way of currency registration.
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(
1725
					'admin_label' => $currency_setting,
1726
				);
1727
			}
1728
1729
			$currencies[ $currency_code ] = wp_parse_args(
1730
				$currencies[ $currency_code ],
1731
				array(
1732
					'admin_label' => '',
1733
					'symbol'      => $currency_code,
1734
					'setting'     => array(),
1735
				)
1736
			);
1737
		}
1738
1739
		if ( ! empty( $info ) && is_string( $info ) && 'all' !== $info ) {
1740
			$currencies = wp_list_pluck( $currencies, $info );
1741
		}
1742
	}
1743
1744
	return $currencies;
1745
}
1746
1747
1748
/**
1749
 * Get all currency symbols
1750
 *
1751
 * @since 1.8.14
1752
 *
1753
 * @param bool $decode_currencies
1754
 *
1755
 * @return array
1756
 */
1757
function give_currency_symbols( $decode_currencies = false ) {
1758
	$currencies = give_get_currencies( 'symbol' );
1759
1760
	if ( $decode_currencies ) {
1761
		array_walk( $currencies, function ( &$currency_symbol ) {
1762
			$currency_symbol = html_entity_decode( $currency_symbol, ENT_COMPAT, 'UTF-8' );
1763
		} );
1764
	}
1765
1766
	/**
1767
	 * Filter the currency symbols
1768
	 *
1769
	 * @since 1.8.14
1770
	 *
1771
	 * @param array $currencies
1772
	 */
1773
	return apply_filters( 'give_currency_symbols', $currencies );
1774
}
1775
1776
1777
/**
1778
 * Give Currency Symbol
1779
 *
1780
 * Given a currency determine the symbol to use. If no currency given, site default is used. If no symbol is determine,
1781
 * the currency string is returned.
1782
 *
1783
 * @since      1.0
1784
 *
1785
 * @param  string $currency        The currency string.
1786
 * @param  bool   $decode_currency Option to HTML decode the currency symbol.
1787
 *
1788
 * @return string           The symbol to use for the currency
1789
 */
1790 View Code Duplication
function give_currency_symbol( $currency = '', $decode_currency = false ) {
0 ignored issues
show
This function seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
1791
1792
	if ( empty( $currency ) ) {
1793
		$currency = give_get_currency();
1794
	}
1795
1796
	$currencies = give_currency_symbols( $decode_currency );
1797
	$symbol     = array_key_exists( $currency, $currencies ) ? $currencies[ $currency ] : $currency;
1798
1799
	/**
1800
	 * Filter the currency symbol
1801
	 *
1802
	 * @since 1.0
1803
	 *
1804
	 * @param string $symbol
1805
	 * @param string $currency
1806
	 */
1807
	return apply_filters( 'give_currency_symbol', $symbol, $currency );
1808
}
1809
1810
1811
/**
1812
 * Get currency name.
1813
 *
1814
 * @since 1.8.8
1815
 *
1816
 * @param string $currency_code
1817
 *
1818
 * @return string
1819
 */
1820
function give_get_currency_name( $currency_code ) {
1821
	$currency_name  = '';
1822
	$currency_names = give_get_currencies();
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 ) );
1827
	}
1828
1829
	/**
1830
	 * Filter the currency name
1831
	 *
1832
	 * @since 1.8.8
1833
	 *
1834
	 * @param string $currency_name
1835
	 * @param string $currency_code
1836
	 */
1837
	return apply_filters( 'give_currency_name', $currency_name, $currency_code );
1838
}
1839
1840
/**
1841
 * Formats the currency displayed.
1842
 *
1843
 * @since 1.0
1844
 *
1845
 * @param string $price The donation amount.
1846
 * @param array  $args  It accepts 'currency_code', 'decode_currency' and 'form_id'.
1847
 *
1848
 * @return mixed|string
1849
 */
1850
function give_currency_filter( $price = '', $args = array() ) {
1851
1852
	// Get functions arguments.
1853
	$func_args = func_get_args();
1854
1855
	// Backward compatibility: modify second param to array
1856
	if ( isset( $func_args[1] ) && is_string( $func_args[1] ) ) {
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] : '',
1861
		);
1862
1863
		give_doing_it_wrong( __FUNCTION__, 'Pass second argument as Array.', GIVE_VERSION );
1864
	}
1865
1866
	// Set default values.
1867
	$args = wp_parse_args(
1868
		$args,
1869
		array(
1870
			'currency_code'   => '',
1871
			'decode_currency' => false,
1872
			'form_id'         => '',
1873
		)
1874
	);
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'] );
1878
	}
1879
1880
	$args['position'] = give_get_option( 'currency_position', 'before' );
1881
1882
	$negative = $price < 0;
1883
1884
	if ( $negative ) {
1885
		// Remove proceeding "-".
1886
		$price = substr( $price, 1 );
1887
	}
1888
1889
	$args['symbol'] = give_currency_symbol( $args['currency_code'], $args['decode_currency'] );
1890
1891
	switch ( $args['currency_code'] ) :
1892
		case 'GBP' :
1893
		case 'BRL' :
1894
		case 'EUR' :
1895
		case 'USD' :
1896
		case 'AUD' :
1897
		case 'CAD' :
1898
		case 'HKD' :
1899
		case 'MXN' :
1900
		case 'NZD' :
1901
		case 'SGD' :
1902
		case 'JPY' :
1903
		case 'THB' :
1904
		case 'INR' :
1905
		case 'IDR' :
1906
		case 'IRR' :
1907
		case 'TRY' :
1908
		case 'RUB' :
1909
		case 'SEK' :
1910
		case 'PLN' :
1911
		case 'PHP' :
1912
		case 'TWD' :
1913
		case 'MYR' :
1914
		case 'CZK' :
1915
		case 'DKK' :
1916
		case 'HUF' :
1917
		case 'ILS' :
1918
		case 'MAD' :
1919
		case 'KRW' :
1920 View Code Duplication
		case 'ZAR' :
0 ignored issues
show
This code seems to be duplicated across your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
1921
			$formatted = ( 'before' === $args['position'] ? $args['symbol'] . $price : $price . $args['symbol'] );
1922
			break;
1923 View Code Duplication
		case 'NOK':
0 ignored issues
show
This code seems to be duplicated across your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
1924
			$formatted = ( 'before' === $args['position'] ? $args['symbol'] . ' ' . $price : $price . ' ' . $args['symbol'] );
1925
			break;
1926 View Code Duplication
		default:
0 ignored issues
show
This code seems to be duplicated across your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
1927
			$formatted = ( 'before' === $args['position'] ? $args['symbol'] . ' ' . $price : $price . ' ' . $args['symbol'] );
1928
			break;
1929
	endswitch;
1930
1931
	/**
1932
	 * Filter formatted amount
1933
	 *
1934
	 * @since 1.8.17
1935
	 */
1936
	$formatted = apply_filters( 'give_currency_filter', $formatted, $args, $price );
1937
1938
	/**
1939
	 * Filter formatted amount with currency
1940
	 *
1941
	 * Filter name depends upon current value of currency and currency position.
1942
	 * For example :
1943
	 *           if currency is USD and currency position is before then
1944
	 *           filter name will be give_usd_currency_filter_before
1945
	 *
1946
	 *           and if currency is USD and currency position is after then
1947
	 *           filter name will be give_usd_currency_filter_after
1948
	 */
1949
	$formatted = apply_filters(
1950
		'give_' . strtolower( $args['currency_code'] ) . "_currency_filter_{$args['position']}",
1951
		$formatted,
1952
		$args['currency_code'],
1953
		$price,
1954
		$args
1955
	);
1956
1957
	if ( $negative ) {
1958
		// Prepend the minus sign before the currency sign.
1959
		$formatted = '-' . $formatted;
1960
	}
1961
1962
	return $formatted;
1963
}
1964
1965
1966
/**
1967
 * Zero Decimal based Currency.
1968
 *
1969
 * @since 1.8.14
1970
 * @since 2.2.0 Modified list.
1971
 * @see   https://github.com/WordImpress/Give/issues/2191
1972
 *
1973
 * @param string $currency Currency code
1974
 *
1975
 * @return bool
1976
 */
1977 View Code Duplication
function give_is_zero_based_currency( $currency = '' ) {
0 ignored issues
show
This function seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
1978
	$zero_based_currency = array(
1979
		'JPY', // Japanese Yen.
1980
		'KRW', // South Korean Won.
1981
		'CLP', // Chilean peso.
1982
		'ISK', // Icelandic króna.
1983
		'BIF', // Burundian franc.
1984
		'DJF', // Djiboutian franc.
1985
		'GNF', // Guinean franc.
1986
		'KHR', // Cambodian riel.
1987
		'KPW', // North Korean won.
1988
		'LAK', // Lao kip.
1989
		'LKR', // Sri Lankan rupee.
1990
		'MGA', // Malagasy ariary.
1991
		'MGA', // Malagasy ariary.
1992
		'MZN', // Mozambican metical.
1993
		'VUV', // Vanuatu vatu.
1994
	);
1995
1996
	// Set default currency.
1997
	if ( empty( $currency ) ) {
1998
		$currency = give_get_currency();
1999
	}
2000
2001
	// Check for Zero Based Currency.
2002
	if ( in_array( $currency, $zero_based_currency ) ) {
2003
		return true;
2004
	}
2005
2006
	return false;
2007
}
2008
2009
2010
/**
2011
 * Check if currency support right to left direction or not.
2012
 *
2013
 * @param string $currency
2014
 *
2015
 * @return bool
2016
 */
2017 View Code Duplication
function give_is_right_to_left_supported_currency( $currency = '' ) {
0 ignored issues
show
This function seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
2018
	$zero_based_currency = apply_filters(
2019
		'give_right_to_left_supported_currency',
2020
		array(
2021
			'IRR',
2022
			'RIAL',
2023
			'MAD',
2024
			'AED',
2025
			'BHD',
2026
			'KWD',
2027
			'OMR',
2028
			'SAR',
2029
			'TND', //https://en.wikipedia.org/wiki/Tunisian_dinar
2030
			'QAR', //https://en.wikipedia.org/wiki/Qatari_riyal
2031
			'LYD', //https://en.wikipedia.org/wiki/Libyan_dinar
2032
			'LBP', //https://en.wikipedia.org/wiki/Lebanese_pound
2033
			'IRT', //https://en.wikipedia.org/wiki/Iranian_toman
2034
			'IQD', //https://en.wikipedia.org/wiki/Iraqi_dinar
2035
			'DZD', //https://en.wikipedia.org/wiki/Algerian_dinar
2036
			'AFN', //https://en.wikipedia.org/wiki/Afghan_afghani
2037
		)
2038
	);
2039
2040
	// Set default currency.
2041
	if ( empty( $currency ) ) {
2042
		$currency = give_get_currency();
2043
	}
2044
2045
	// Check for Zero Based Currency.
2046
	if ( in_array( $currency, $zero_based_currency ) ) {
2047
		return true;
2048
	}
2049
2050
	return false;
2051
}