Test Failed
Push — master ( 7fe983...516c23 )
by Devin
08:07 queued 03:09
created
includes/country-functions.php 1 patch
Spacing   +1066 added lines, -1066 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
  */
11 11
 
12 12
 // Exit if accessed directly.
13
-if ( ! defined( 'ABSPATH' ) ) {
13
+if ( ! defined('ABSPATH')) {
14 14
 	exit;
15 15
 }
16 16
 
@@ -22,9 +22,9 @@  discard block
 block discarded – undo
22 22
  */
23 23
 function give_get_country() {
24 24
 	$give_options = give_get_settings();
25
-	$country      = isset( $give_options['base_country'] ) ? $give_options['base_country'] : 'US';
25
+	$country      = isset($give_options['base_country']) ? $give_options['base_country'] : 'US';
26 26
 
27
-	return apply_filters( 'give_give_country', $country );
27
+	return apply_filters('give_give_country', $country);
28 28
 }
29 29
 
30 30
 /**
@@ -35,9 +35,9 @@  discard block
 block discarded – undo
35 35
  */
36 36
 function give_get_state() {
37 37
 	$give_options = give_get_settings();
38
-	$state        = isset( $give_options['base_state'] ) ? $give_options['base_state'] : false;
38
+	$state        = isset($give_options['base_state']) ? $give_options['base_state'] : false;
39 39
 
40
-	return apply_filters( 'give_give_state', $state );
40
+	return apply_filters('give_give_state', $state);
41 41
 }
42 42
 
43 43
 /**
@@ -49,12 +49,12 @@  discard block
 block discarded – undo
49 49
  *
50 50
  * @return mixed  A list of states for the site's base country.
51 51
  */
52
-function give_get_states( $country = null ) {
52
+function give_get_states($country = null) {
53 53
 	// If Country have no states return empty array.
54 54
 	$states = array();
55 55
 
56 56
 	// Check if Country Code is empty or not.
57
-	if ( empty( $country ) ) {
57
+	if (empty($country)) {
58 58
 		// Get defalut country code that is being set by the admin.
59 59
 		$country = give_get_country();
60 60
 	}
@@ -63,8 +63,8 @@  discard block
 block discarded – undo
63 63
 	$states_list = give_states_list();
64 64
 
65 65
 	// Check if $country code exists in the array key.
66
-	if ( array_key_exists( $country, $states_list ) ) {
67
-		$states = $states_list[ $country ];
66
+	if (array_key_exists($country, $states_list)) {
67
+		$states = $states_list[$country];
68 68
 	}
69 69
 
70 70
 	/**
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
 	 *
73 73
 	 * @param string $query Database count query
74 74
 	 */
75
-	return (array) apply_filters( 'give_give_states', $states );
75
+	return (array) apply_filters('give_give_states', $states);
76 76
 }
77 77
 
78 78
 /**
@@ -84,253 +84,253 @@  discard block
 block discarded – undo
84 84
 function give_get_country_list() {
85 85
 	$countries = array(
86 86
 		''   => '',
87
-		'US' => esc_html__( 'United States', 'give' ),
88
-		'CA' => esc_html__( 'Canada', 'give' ),
89
-		'GB' => esc_html__( 'United Kingdom', 'give' ),
90
-		'AF' => esc_html__( 'Afghanistan', 'give' ),
91
-		'AL' => esc_html__( 'Albania', 'give' ),
92
-		'DZ' => esc_html__( 'Algeria', 'give' ),
93
-		'AS' => esc_html__( 'American Samoa', 'give' ),
94
-		'AD' => esc_html__( 'Andorra', 'give' ),
95
-		'AO' => esc_html__( 'Angola', 'give' ),
96
-		'AI' => esc_html__( 'Anguilla', 'give' ),
97
-		'AQ' => esc_html__( 'Antarctica', 'give' ),
98
-		'AG' => esc_html__( 'Antigua and Barbuda', 'give' ),
99
-		'AR' => esc_html__( 'Argentina', 'give' ),
100
-		'AM' => esc_html__( 'Armenia', 'give' ),
101
-		'AW' => esc_html__( 'Aruba', 'give' ),
102
-		'AU' => esc_html__( 'Australia', 'give' ),
103
-		'AT' => esc_html__( 'Austria', 'give' ),
104
-		'AZ' => esc_html__( 'Azerbaijan', 'give' ),
105
-		'BS' => esc_html__( 'Bahamas', 'give' ),
106
-		'BH' => esc_html__( 'Bahrain', 'give' ),
107
-		'BD' => esc_html__( 'Bangladesh', 'give' ),
108
-		'BB' => esc_html__( 'Barbados', 'give' ),
109
-		'BY' => esc_html__( 'Belarus', 'give' ),
110
-		'BE' => esc_html__( 'Belgium', 'give' ),
111
-		'BZ' => esc_html__( 'Belize', 'give' ),
112
-		'BJ' => esc_html__( 'Benin', 'give' ),
113
-		'BM' => esc_html__( 'Bermuda', 'give' ),
114
-		'BT' => esc_html__( 'Bhutan', 'give' ),
115
-		'BO' => esc_html__( 'Bolivia', 'give' ),
116
-		'BA' => esc_html__( 'Bosnia and Herzegovina', 'give' ),
117
-		'BW' => esc_html__( 'Botswana', 'give' ),
118
-		'BV' => esc_html__( 'Bouvet Island', 'give' ),
119
-		'BR' => esc_html__( 'Brazil', 'give' ),
120
-		'IO' => esc_html__( 'British Indian Ocean Territory', 'give' ),
121
-		'BN' => esc_html__( 'Brunei Darrussalam', 'give' ),
122
-		'BG' => esc_html__( 'Bulgaria', 'give' ),
123
-		'BF' => esc_html__( 'Burkina Faso', 'give' ),
124
-		'BI' => esc_html__( 'Burundi', 'give' ),
125
-		'KH' => esc_html__( 'Cambodia', 'give' ),
126
-		'CM' => esc_html__( 'Cameroon', 'give' ),
127
-		'CV' => esc_html__( 'Cape Verde', 'give' ),
128
-		'KY' => esc_html__( 'Cayman Islands', 'give' ),
129
-		'CF' => esc_html__( 'Central African Republic', 'give' ),
130
-		'TD' => esc_html__( 'Chad', 'give' ),
131
-		'CL' => esc_html__( 'Chile', 'give' ),
132
-		'CN' => esc_html__( 'China', 'give' ),
133
-		'CX' => esc_html__( 'Christmas Island', 'give' ),
134
-		'CC' => esc_html__( 'Cocos Islands', 'give' ),
135
-		'CO' => esc_html__( 'Colombia', 'give' ),
136
-		'KM' => esc_html__( 'Comoros', 'give' ),
137
-		'CD' => esc_html__( 'Congo, Democratic People\'s Republic', 'give' ),
138
-		'CG' => esc_html__( 'Congo, Republic of', 'give' ),
139
-		'CK' => esc_html__( 'Cook Islands', 'give' ),
140
-		'CR' => esc_html__( 'Costa Rica', 'give' ),
141
-		'CI' => esc_html__( 'Cote d\'Ivoire', 'give' ),
142
-		'HR' => esc_html__( 'Croatia/Hrvatska', 'give' ),
143
-		'CU' => esc_html__( 'Cuba', 'give' ),
144
-		'CY' => esc_html__( 'Cyprus Island', 'give' ),
145
-		'CZ' => esc_html__( 'Czech Republic', 'give' ),
146
-		'DK' => esc_html__( 'Denmark', 'give' ),
147
-		'DJ' => esc_html__( 'Djibouti', 'give' ),
148
-		'DM' => esc_html__( 'Dominica', 'give' ),
149
-		'DO' => esc_html__( 'Dominican Republic', 'give' ),
150
-		'TP' => esc_html__( 'East Timor', 'give' ),
151
-		'EC' => esc_html__( 'Ecuador', 'give' ),
152
-		'EG' => esc_html__( 'Egypt', 'give' ),
153
-		'GQ' => esc_html__( 'Equatorial Guinea', 'give' ),
154
-		'SV' => esc_html__( 'El Salvador', 'give' ),
155
-		'ER' => esc_html__( 'Eritrea', 'give' ),
156
-		'EE' => esc_html__( 'Estonia', 'give' ),
157
-		'ET' => esc_html__( 'Ethiopia', 'give' ),
158
-		'FK' => esc_html__( 'Falkland Islands', 'give' ),
159
-		'FO' => esc_html__( 'Faroe Islands', 'give' ),
160
-		'FJ' => esc_html__( 'Fiji', 'give' ),
161
-		'FI' => esc_html__( 'Finland', 'give' ),
162
-		'FR' => esc_html__( 'France', 'give' ),
163
-		'GF' => esc_html__( 'French Guiana', 'give' ),
164
-		'PF' => esc_html__( 'French Polynesia', 'give' ),
165
-		'TF' => esc_html__( 'French Southern Territories', 'give' ),
166
-		'GA' => esc_html__( 'Gabon', 'give' ),
167
-		'GM' => esc_html__( 'Gambia', 'give' ),
168
-		'GE' => esc_html__( 'Georgia', 'give' ),
169
-		'DE' => esc_html__( 'Germany', 'give' ),
170
-		'GR' => esc_html__( 'Greece', 'give' ),
171
-		'GH' => esc_html__( 'Ghana', 'give' ),
172
-		'GI' => esc_html__( 'Gibraltar', 'give' ),
173
-		'GL' => esc_html__( 'Greenland', 'give' ),
174
-		'GD' => esc_html__( 'Grenada', 'give' ),
175
-		'GP' => esc_html__( 'Guadeloupe', 'give' ),
176
-		'GU' => esc_html__( 'Guam', 'give' ),
177
-		'GT' => esc_html__( 'Guatemala', 'give' ),
178
-		'GG' => esc_html__( 'Guernsey', 'give' ),
179
-		'GN' => esc_html__( 'Guinea', 'give' ),
180
-		'GW' => esc_html__( 'Guinea-Bissau', 'give' ),
181
-		'GY' => esc_html__( 'Guyana', 'give' ),
182
-		'HT' => esc_html__( 'Haiti', 'give' ),
183
-		'HM' => esc_html__( 'Heard and McDonald Islands', 'give' ),
184
-		'VA' => esc_html__( 'Holy See (City Vatican State)', 'give' ),
185
-		'HN' => esc_html__( 'Honduras', 'give' ),
186
-		'HK' => esc_html__( 'Hong Kong', 'give' ),
187
-		'HU' => esc_html__( 'Hungary', 'give' ),
188
-		'IS' => esc_html__( 'Iceland', 'give' ),
189
-		'IN' => esc_html__( 'India', 'give' ),
190
-		'ID' => esc_html__( 'Indonesia', 'give' ),
191
-		'IR' => esc_html__( 'Iran', 'give' ),
192
-		'IQ' => esc_html__( 'Iraq', 'give' ),
193
-		'IE' => esc_html__( 'Ireland', 'give' ),
194
-		'IM' => esc_html__( 'Isle of Man', 'give' ),
195
-		'IL' => esc_html__( 'Israel', 'give' ),
196
-		'IT' => esc_html__( 'Italy', 'give' ),
197
-		'JM' => esc_html__( 'Jamaica', 'give' ),
198
-		'JP' => esc_html__( 'Japan', 'give' ),
199
-		'JE' => esc_html__( 'Jersey', 'give' ),
200
-		'JO' => esc_html__( 'Jordan', 'give' ),
201
-		'KZ' => esc_html__( 'Kazakhstan', 'give' ),
202
-		'KE' => esc_html__( 'Kenya', 'give' ),
203
-		'KI' => esc_html__( 'Kiribati', 'give' ),
204
-		'KW' => esc_html__( 'Kuwait', 'give' ),
205
-		'KG' => esc_html__( 'Kyrgyzstan', 'give' ),
206
-		'LA' => esc_html__( 'Lao People\'s Democratic Republic', 'give' ),
207
-		'LV' => esc_html__( 'Latvia', 'give' ),
208
-		'LB' => esc_html__( 'Lebanon', 'give' ),
209
-		'LS' => esc_html__( 'Lesotho', 'give' ),
210
-		'LR' => esc_html__( 'Liberia', 'give' ),
211
-		'LY' => esc_html__( 'Libyan Arab Jamahiriya', 'give' ),
212
-		'LI' => esc_html__( 'Liechtenstein', 'give' ),
213
-		'LT' => esc_html__( 'Lithuania', 'give' ),
214
-		'LU' => esc_html__( 'Luxembourg', 'give' ),
215
-		'MO' => esc_html__( 'Macau', 'give' ),
216
-		'MK' => esc_html__( 'Macedonia', 'give' ),
217
-		'MG' => esc_html__( 'Madagascar', 'give' ),
218
-		'MW' => esc_html__( 'Malawi', 'give' ),
219
-		'MY' => esc_html__( 'Malaysia', 'give' ),
220
-		'MV' => esc_html__( 'Maldives', 'give' ),
221
-		'ML' => esc_html__( 'Mali', 'give' ),
222
-		'MT' => esc_html__( 'Malta', 'give' ),
223
-		'MH' => esc_html__( 'Marshall Islands', 'give' ),
224
-		'MQ' => esc_html__( 'Martinique', 'give' ),
225
-		'MR' => esc_html__( 'Mauritania', 'give' ),
226
-		'MU' => esc_html__( 'Mauritius', 'give' ),
227
-		'YT' => esc_html__( 'Mayotte', 'give' ),
228
-		'MX' => esc_html__( 'Mexico', 'give' ),
229
-		'FM' => esc_html__( 'Micronesia', 'give' ),
230
-		'MD' => esc_html__( 'Moldova, Republic of', 'give' ),
231
-		'MC' => esc_html__( 'Monaco', 'give' ),
232
-		'MN' => esc_html__( 'Mongolia', 'give' ),
233
-		'ME' => esc_html__( 'Montenegro', 'give' ),
234
-		'MS' => esc_html__( 'Montserrat', 'give' ),
235
-		'MA' => esc_html__( 'Morocco', 'give' ),
236
-		'MZ' => esc_html__( 'Mozambique', 'give' ),
237
-		'MM' => esc_html__( 'Myanmar', 'give' ),
238
-		'NA' => esc_html__( 'Namibia', 'give' ),
239
-		'NR' => esc_html__( 'Nauru', 'give' ),
240
-		'NP' => esc_html__( 'Nepal', 'give' ),
241
-		'NL' => esc_html__( 'Netherlands', 'give' ),
242
-		'AN' => esc_html__( 'Netherlands Antilles', 'give' ),
243
-		'NC' => esc_html__( 'New Caledonia', 'give' ),
244
-		'NZ' => esc_html__( 'New Zealand', 'give' ),
245
-		'NI' => esc_html__( 'Nicaragua', 'give' ),
246
-		'NE' => esc_html__( 'Niger', 'give' ),
247
-		'NG' => esc_html__( 'Nigeria', 'give' ),
248
-		'NU' => esc_html__( 'Niue', 'give' ),
249
-		'NF' => esc_html__( 'Norfolk Island', 'give' ),
250
-		'KP' => esc_html__( 'North Korea', 'give' ),
251
-		'MP' => esc_html__( 'Northern Mariana Islands', 'give' ),
252
-		'NO' => esc_html__( 'Norway', 'give' ),
253
-		'OM' => esc_html__( 'Oman', 'give' ),
254
-		'PK' => esc_html__( 'Pakistan', 'give' ),
255
-		'PW' => esc_html__( 'Palau', 'give' ),
256
-		'PS' => esc_html__( 'Palestinian Territories', 'give' ),
257
-		'PA' => esc_html__( 'Panama', 'give' ),
258
-		'PG' => esc_html__( 'Papua New Guinea', 'give' ),
259
-		'PY' => esc_html__( 'Paraguay', 'give' ),
260
-		'PE' => esc_html__( 'Peru', 'give' ),
261
-		'PH' => esc_html__( 'Phillipines', 'give' ),
262
-		'PN' => esc_html__( 'Pitcairn Island', 'give' ),
263
-		'PL' => esc_html__( 'Poland', 'give' ),
264
-		'PT' => esc_html__( 'Portugal', 'give' ),
265
-		'PR' => esc_html__( 'Puerto Rico', 'give' ),
266
-		'QA' => esc_html__( 'Qatar', 'give' ),
267
-		'RE' => esc_html__( 'Reunion Island', 'give' ),
268
-		'RO' => esc_html__( 'Romania', 'give' ),
269
-		'RU' => esc_html__( 'Russian Federation', 'give' ),
270
-		'RW' => esc_html__( 'Rwanda', 'give' ),
271
-		'SH' => esc_html__( 'Saint Helena', 'give' ),
272
-		'KN' => esc_html__( 'Saint Kitts and Nevis', 'give' ),
273
-		'LC' => esc_html__( 'Saint Lucia', 'give' ),
274
-		'PM' => esc_html__( 'Saint Pierre and Miquelon', 'give' ),
275
-		'VC' => esc_html__( 'Saint Vincent and the Grenadines', 'give' ),
276
-		'SM' => esc_html__( 'San Marino', 'give' ),
277
-		'ST' => esc_html__( 'Sao Tome and Principe', 'give' ),
278
-		'SA' => esc_html__( 'Saudi Arabia', 'give' ),
279
-		'SN' => esc_html__( 'Senegal', 'give' ),
280
-		'RS' => esc_html__( 'Serbia', 'give' ),
281
-		'SC' => esc_html__( 'Seychelles', 'give' ),
282
-		'SL' => esc_html__( 'Sierra Leone', 'give' ),
283
-		'SG' => esc_html__( 'Singapore', 'give' ),
284
-		'SK' => esc_html__( 'Slovak Republic', 'give' ),
285
-		'SI' => esc_html__( 'Slovenia', 'give' ),
286
-		'SB' => esc_html__( 'Solomon Islands', 'give' ),
287
-		'SO' => esc_html__( 'Somalia', 'give' ),
288
-		'ZA' => esc_html__( 'South Africa', 'give' ),
289
-		'GS' => esc_html__( 'South Georgia', 'give' ),
290
-		'KR' => esc_html__( 'South Korea', 'give' ),
291
-		'ES' => esc_html__( 'Spain', 'give' ),
292
-		'LK' => esc_html__( 'Sri Lanka', 'give' ),
293
-		'SD' => esc_html__( 'Sudan', 'give' ),
294
-		'SR' => esc_html__( 'Suriname', 'give' ),
295
-		'SJ' => esc_html__( 'Svalbard and Jan Mayen Islands', 'give' ),
296
-		'SZ' => esc_html__( 'Swaziland', 'give' ),
297
-		'SE' => esc_html__( 'Sweden', 'give' ),
298
-		'CH' => esc_html__( 'Switzerland', 'give' ),
299
-		'SY' => esc_html__( 'Syrian Arab Republic', 'give' ),
300
-		'TW' => esc_html__( 'Taiwan', 'give' ),
301
-		'TJ' => esc_html__( 'Tajikistan', 'give' ),
302
-		'TZ' => esc_html__( 'Tanzania', 'give' ),
303
-		'TG' => esc_html__( 'Togo', 'give' ),
304
-		'TK' => esc_html__( 'Tokelau', 'give' ),
305
-		'TO' => esc_html__( 'Tonga', 'give' ),
306
-		'TH' => esc_html__( 'Thailand', 'give' ),
307
-		'TT' => esc_html__( 'Trinidad and Tobago', 'give' ),
308
-		'TN' => esc_html__( 'Tunisia', 'give' ),
309
-		'TR' => esc_html__( 'Turkey', 'give' ),
310
-		'TM' => esc_html__( 'Turkmenistan', 'give' ),
311
-		'TC' => esc_html__( 'Turks and Caicos Islands', 'give' ),
312
-		'TV' => esc_html__( 'Tuvalu', 'give' ),
313
-		'UG' => esc_html__( 'Uganda', 'give' ),
314
-		'UA' => esc_html__( 'Ukraine', 'give' ),
315
-		'AE' => esc_html__( 'United Arab Emirates', 'give' ),
316
-		'UY' => esc_html__( 'Uruguay', 'give' ),
317
-		'UM' => esc_html__( 'US Minor Outlying Islands', 'give' ),
318
-		'UZ' => esc_html__( 'Uzbekistan', 'give' ),
319
-		'VU' => esc_html__( 'Vanuatu', 'give' ),
320
-		'VE' => esc_html__( 'Venezuela', 'give' ),
321
-		'VN' => esc_html__( 'Vietnam', 'give' ),
322
-		'VG' => esc_html__( 'Virgin Islands (British)', 'give' ),
323
-		'VI' => esc_html__( 'Virgin Islands (USA)', 'give' ),
324
-		'WF' => esc_html__( 'Wallis and Futuna Islands', 'give' ),
325
-		'EH' => esc_html__( 'Western Sahara', 'give' ),
326
-		'WS' => esc_html__( 'Western Samoa', 'give' ),
327
-		'YE' => esc_html__( 'Yemen', 'give' ),
328
-		'YU' => esc_html__( 'Yugoslavia', 'give' ),
329
-		'ZM' => esc_html__( 'Zambia', 'give' ),
330
-		'ZW' => esc_html__( 'Zimbabwe', 'give' ),
87
+		'US' => esc_html__('United States', 'give'),
88
+		'CA' => esc_html__('Canada', 'give'),
89
+		'GB' => esc_html__('United Kingdom', 'give'),
90
+		'AF' => esc_html__('Afghanistan', 'give'),
91
+		'AL' => esc_html__('Albania', 'give'),
92
+		'DZ' => esc_html__('Algeria', 'give'),
93
+		'AS' => esc_html__('American Samoa', 'give'),
94
+		'AD' => esc_html__('Andorra', 'give'),
95
+		'AO' => esc_html__('Angola', 'give'),
96
+		'AI' => esc_html__('Anguilla', 'give'),
97
+		'AQ' => esc_html__('Antarctica', 'give'),
98
+		'AG' => esc_html__('Antigua and Barbuda', 'give'),
99
+		'AR' => esc_html__('Argentina', 'give'),
100
+		'AM' => esc_html__('Armenia', 'give'),
101
+		'AW' => esc_html__('Aruba', 'give'),
102
+		'AU' => esc_html__('Australia', 'give'),
103
+		'AT' => esc_html__('Austria', 'give'),
104
+		'AZ' => esc_html__('Azerbaijan', 'give'),
105
+		'BS' => esc_html__('Bahamas', 'give'),
106
+		'BH' => esc_html__('Bahrain', 'give'),
107
+		'BD' => esc_html__('Bangladesh', 'give'),
108
+		'BB' => esc_html__('Barbados', 'give'),
109
+		'BY' => esc_html__('Belarus', 'give'),
110
+		'BE' => esc_html__('Belgium', 'give'),
111
+		'BZ' => esc_html__('Belize', 'give'),
112
+		'BJ' => esc_html__('Benin', 'give'),
113
+		'BM' => esc_html__('Bermuda', 'give'),
114
+		'BT' => esc_html__('Bhutan', 'give'),
115
+		'BO' => esc_html__('Bolivia', 'give'),
116
+		'BA' => esc_html__('Bosnia and Herzegovina', 'give'),
117
+		'BW' => esc_html__('Botswana', 'give'),
118
+		'BV' => esc_html__('Bouvet Island', 'give'),
119
+		'BR' => esc_html__('Brazil', 'give'),
120
+		'IO' => esc_html__('British Indian Ocean Territory', 'give'),
121
+		'BN' => esc_html__('Brunei Darrussalam', 'give'),
122
+		'BG' => esc_html__('Bulgaria', 'give'),
123
+		'BF' => esc_html__('Burkina Faso', 'give'),
124
+		'BI' => esc_html__('Burundi', 'give'),
125
+		'KH' => esc_html__('Cambodia', 'give'),
126
+		'CM' => esc_html__('Cameroon', 'give'),
127
+		'CV' => esc_html__('Cape Verde', 'give'),
128
+		'KY' => esc_html__('Cayman Islands', 'give'),
129
+		'CF' => esc_html__('Central African Republic', 'give'),
130
+		'TD' => esc_html__('Chad', 'give'),
131
+		'CL' => esc_html__('Chile', 'give'),
132
+		'CN' => esc_html__('China', 'give'),
133
+		'CX' => esc_html__('Christmas Island', 'give'),
134
+		'CC' => esc_html__('Cocos Islands', 'give'),
135
+		'CO' => esc_html__('Colombia', 'give'),
136
+		'KM' => esc_html__('Comoros', 'give'),
137
+		'CD' => esc_html__('Congo, Democratic People\'s Republic', 'give'),
138
+		'CG' => esc_html__('Congo, Republic of', 'give'),
139
+		'CK' => esc_html__('Cook Islands', 'give'),
140
+		'CR' => esc_html__('Costa Rica', 'give'),
141
+		'CI' => esc_html__('Cote d\'Ivoire', 'give'),
142
+		'HR' => esc_html__('Croatia/Hrvatska', 'give'),
143
+		'CU' => esc_html__('Cuba', 'give'),
144
+		'CY' => esc_html__('Cyprus Island', 'give'),
145
+		'CZ' => esc_html__('Czech Republic', 'give'),
146
+		'DK' => esc_html__('Denmark', 'give'),
147
+		'DJ' => esc_html__('Djibouti', 'give'),
148
+		'DM' => esc_html__('Dominica', 'give'),
149
+		'DO' => esc_html__('Dominican Republic', 'give'),
150
+		'TP' => esc_html__('East Timor', 'give'),
151
+		'EC' => esc_html__('Ecuador', 'give'),
152
+		'EG' => esc_html__('Egypt', 'give'),
153
+		'GQ' => esc_html__('Equatorial Guinea', 'give'),
154
+		'SV' => esc_html__('El Salvador', 'give'),
155
+		'ER' => esc_html__('Eritrea', 'give'),
156
+		'EE' => esc_html__('Estonia', 'give'),
157
+		'ET' => esc_html__('Ethiopia', 'give'),
158
+		'FK' => esc_html__('Falkland Islands', 'give'),
159
+		'FO' => esc_html__('Faroe Islands', 'give'),
160
+		'FJ' => esc_html__('Fiji', 'give'),
161
+		'FI' => esc_html__('Finland', 'give'),
162
+		'FR' => esc_html__('France', 'give'),
163
+		'GF' => esc_html__('French Guiana', 'give'),
164
+		'PF' => esc_html__('French Polynesia', 'give'),
165
+		'TF' => esc_html__('French Southern Territories', 'give'),
166
+		'GA' => esc_html__('Gabon', 'give'),
167
+		'GM' => esc_html__('Gambia', 'give'),
168
+		'GE' => esc_html__('Georgia', 'give'),
169
+		'DE' => esc_html__('Germany', 'give'),
170
+		'GR' => esc_html__('Greece', 'give'),
171
+		'GH' => esc_html__('Ghana', 'give'),
172
+		'GI' => esc_html__('Gibraltar', 'give'),
173
+		'GL' => esc_html__('Greenland', 'give'),
174
+		'GD' => esc_html__('Grenada', 'give'),
175
+		'GP' => esc_html__('Guadeloupe', 'give'),
176
+		'GU' => esc_html__('Guam', 'give'),
177
+		'GT' => esc_html__('Guatemala', 'give'),
178
+		'GG' => esc_html__('Guernsey', 'give'),
179
+		'GN' => esc_html__('Guinea', 'give'),
180
+		'GW' => esc_html__('Guinea-Bissau', 'give'),
181
+		'GY' => esc_html__('Guyana', 'give'),
182
+		'HT' => esc_html__('Haiti', 'give'),
183
+		'HM' => esc_html__('Heard and McDonald Islands', 'give'),
184
+		'VA' => esc_html__('Holy See (City Vatican State)', 'give'),
185
+		'HN' => esc_html__('Honduras', 'give'),
186
+		'HK' => esc_html__('Hong Kong', 'give'),
187
+		'HU' => esc_html__('Hungary', 'give'),
188
+		'IS' => esc_html__('Iceland', 'give'),
189
+		'IN' => esc_html__('India', 'give'),
190
+		'ID' => esc_html__('Indonesia', 'give'),
191
+		'IR' => esc_html__('Iran', 'give'),
192
+		'IQ' => esc_html__('Iraq', 'give'),
193
+		'IE' => esc_html__('Ireland', 'give'),
194
+		'IM' => esc_html__('Isle of Man', 'give'),
195
+		'IL' => esc_html__('Israel', 'give'),
196
+		'IT' => esc_html__('Italy', 'give'),
197
+		'JM' => esc_html__('Jamaica', 'give'),
198
+		'JP' => esc_html__('Japan', 'give'),
199
+		'JE' => esc_html__('Jersey', 'give'),
200
+		'JO' => esc_html__('Jordan', 'give'),
201
+		'KZ' => esc_html__('Kazakhstan', 'give'),
202
+		'KE' => esc_html__('Kenya', 'give'),
203
+		'KI' => esc_html__('Kiribati', 'give'),
204
+		'KW' => esc_html__('Kuwait', 'give'),
205
+		'KG' => esc_html__('Kyrgyzstan', 'give'),
206
+		'LA' => esc_html__('Lao People\'s Democratic Republic', 'give'),
207
+		'LV' => esc_html__('Latvia', 'give'),
208
+		'LB' => esc_html__('Lebanon', 'give'),
209
+		'LS' => esc_html__('Lesotho', 'give'),
210
+		'LR' => esc_html__('Liberia', 'give'),
211
+		'LY' => esc_html__('Libyan Arab Jamahiriya', 'give'),
212
+		'LI' => esc_html__('Liechtenstein', 'give'),
213
+		'LT' => esc_html__('Lithuania', 'give'),
214
+		'LU' => esc_html__('Luxembourg', 'give'),
215
+		'MO' => esc_html__('Macau', 'give'),
216
+		'MK' => esc_html__('Macedonia', 'give'),
217
+		'MG' => esc_html__('Madagascar', 'give'),
218
+		'MW' => esc_html__('Malawi', 'give'),
219
+		'MY' => esc_html__('Malaysia', 'give'),
220
+		'MV' => esc_html__('Maldives', 'give'),
221
+		'ML' => esc_html__('Mali', 'give'),
222
+		'MT' => esc_html__('Malta', 'give'),
223
+		'MH' => esc_html__('Marshall Islands', 'give'),
224
+		'MQ' => esc_html__('Martinique', 'give'),
225
+		'MR' => esc_html__('Mauritania', 'give'),
226
+		'MU' => esc_html__('Mauritius', 'give'),
227
+		'YT' => esc_html__('Mayotte', 'give'),
228
+		'MX' => esc_html__('Mexico', 'give'),
229
+		'FM' => esc_html__('Micronesia', 'give'),
230
+		'MD' => esc_html__('Moldova, Republic of', 'give'),
231
+		'MC' => esc_html__('Monaco', 'give'),
232
+		'MN' => esc_html__('Mongolia', 'give'),
233
+		'ME' => esc_html__('Montenegro', 'give'),
234
+		'MS' => esc_html__('Montserrat', 'give'),
235
+		'MA' => esc_html__('Morocco', 'give'),
236
+		'MZ' => esc_html__('Mozambique', 'give'),
237
+		'MM' => esc_html__('Myanmar', 'give'),
238
+		'NA' => esc_html__('Namibia', 'give'),
239
+		'NR' => esc_html__('Nauru', 'give'),
240
+		'NP' => esc_html__('Nepal', 'give'),
241
+		'NL' => esc_html__('Netherlands', 'give'),
242
+		'AN' => esc_html__('Netherlands Antilles', 'give'),
243
+		'NC' => esc_html__('New Caledonia', 'give'),
244
+		'NZ' => esc_html__('New Zealand', 'give'),
245
+		'NI' => esc_html__('Nicaragua', 'give'),
246
+		'NE' => esc_html__('Niger', 'give'),
247
+		'NG' => esc_html__('Nigeria', 'give'),
248
+		'NU' => esc_html__('Niue', 'give'),
249
+		'NF' => esc_html__('Norfolk Island', 'give'),
250
+		'KP' => esc_html__('North Korea', 'give'),
251
+		'MP' => esc_html__('Northern Mariana Islands', 'give'),
252
+		'NO' => esc_html__('Norway', 'give'),
253
+		'OM' => esc_html__('Oman', 'give'),
254
+		'PK' => esc_html__('Pakistan', 'give'),
255
+		'PW' => esc_html__('Palau', 'give'),
256
+		'PS' => esc_html__('Palestinian Territories', 'give'),
257
+		'PA' => esc_html__('Panama', 'give'),
258
+		'PG' => esc_html__('Papua New Guinea', 'give'),
259
+		'PY' => esc_html__('Paraguay', 'give'),
260
+		'PE' => esc_html__('Peru', 'give'),
261
+		'PH' => esc_html__('Phillipines', 'give'),
262
+		'PN' => esc_html__('Pitcairn Island', 'give'),
263
+		'PL' => esc_html__('Poland', 'give'),
264
+		'PT' => esc_html__('Portugal', 'give'),
265
+		'PR' => esc_html__('Puerto Rico', 'give'),
266
+		'QA' => esc_html__('Qatar', 'give'),
267
+		'RE' => esc_html__('Reunion Island', 'give'),
268
+		'RO' => esc_html__('Romania', 'give'),
269
+		'RU' => esc_html__('Russian Federation', 'give'),
270
+		'RW' => esc_html__('Rwanda', 'give'),
271
+		'SH' => esc_html__('Saint Helena', 'give'),
272
+		'KN' => esc_html__('Saint Kitts and Nevis', 'give'),
273
+		'LC' => esc_html__('Saint Lucia', 'give'),
274
+		'PM' => esc_html__('Saint Pierre and Miquelon', 'give'),
275
+		'VC' => esc_html__('Saint Vincent and the Grenadines', 'give'),
276
+		'SM' => esc_html__('San Marino', 'give'),
277
+		'ST' => esc_html__('Sao Tome and Principe', 'give'),
278
+		'SA' => esc_html__('Saudi Arabia', 'give'),
279
+		'SN' => esc_html__('Senegal', 'give'),
280
+		'RS' => esc_html__('Serbia', 'give'),
281
+		'SC' => esc_html__('Seychelles', 'give'),
282
+		'SL' => esc_html__('Sierra Leone', 'give'),
283
+		'SG' => esc_html__('Singapore', 'give'),
284
+		'SK' => esc_html__('Slovak Republic', 'give'),
285
+		'SI' => esc_html__('Slovenia', 'give'),
286
+		'SB' => esc_html__('Solomon Islands', 'give'),
287
+		'SO' => esc_html__('Somalia', 'give'),
288
+		'ZA' => esc_html__('South Africa', 'give'),
289
+		'GS' => esc_html__('South Georgia', 'give'),
290
+		'KR' => esc_html__('South Korea', 'give'),
291
+		'ES' => esc_html__('Spain', 'give'),
292
+		'LK' => esc_html__('Sri Lanka', 'give'),
293
+		'SD' => esc_html__('Sudan', 'give'),
294
+		'SR' => esc_html__('Suriname', 'give'),
295
+		'SJ' => esc_html__('Svalbard and Jan Mayen Islands', 'give'),
296
+		'SZ' => esc_html__('Swaziland', 'give'),
297
+		'SE' => esc_html__('Sweden', 'give'),
298
+		'CH' => esc_html__('Switzerland', 'give'),
299
+		'SY' => esc_html__('Syrian Arab Republic', 'give'),
300
+		'TW' => esc_html__('Taiwan', 'give'),
301
+		'TJ' => esc_html__('Tajikistan', 'give'),
302
+		'TZ' => esc_html__('Tanzania', 'give'),
303
+		'TG' => esc_html__('Togo', 'give'),
304
+		'TK' => esc_html__('Tokelau', 'give'),
305
+		'TO' => esc_html__('Tonga', 'give'),
306
+		'TH' => esc_html__('Thailand', 'give'),
307
+		'TT' => esc_html__('Trinidad and Tobago', 'give'),
308
+		'TN' => esc_html__('Tunisia', 'give'),
309
+		'TR' => esc_html__('Turkey', 'give'),
310
+		'TM' => esc_html__('Turkmenistan', 'give'),
311
+		'TC' => esc_html__('Turks and Caicos Islands', 'give'),
312
+		'TV' => esc_html__('Tuvalu', 'give'),
313
+		'UG' => esc_html__('Uganda', 'give'),
314
+		'UA' => esc_html__('Ukraine', 'give'),
315
+		'AE' => esc_html__('United Arab Emirates', 'give'),
316
+		'UY' => esc_html__('Uruguay', 'give'),
317
+		'UM' => esc_html__('US Minor Outlying Islands', 'give'),
318
+		'UZ' => esc_html__('Uzbekistan', 'give'),
319
+		'VU' => esc_html__('Vanuatu', 'give'),
320
+		'VE' => esc_html__('Venezuela', 'give'),
321
+		'VN' => esc_html__('Vietnam', 'give'),
322
+		'VG' => esc_html__('Virgin Islands (British)', 'give'),
323
+		'VI' => esc_html__('Virgin Islands (USA)', 'give'),
324
+		'WF' => esc_html__('Wallis and Futuna Islands', 'give'),
325
+		'EH' => esc_html__('Western Sahara', 'give'),
326
+		'WS' => esc_html__('Western Samoa', 'give'),
327
+		'YE' => esc_html__('Yemen', 'give'),
328
+		'YU' => esc_html__('Yugoslavia', 'give'),
329
+		'ZM' => esc_html__('Zambia', 'give'),
330
+		'ZW' => esc_html__('Zimbabwe', 'give'),
331 331
 	);
332 332
 
333
-	return (array) apply_filters( 'give_countries', $countries );
333
+	return (array) apply_filters('give_countries', $countries);
334 334
 }
335 335
 
336 336
 /**
@@ -384,7 +384,7 @@  discard block
 block discarded – undo
384 384
 	 *
385 385
 	 * @param array $states Contain the list of states in array key format where key of the array is there respected country code.
386 386
 	 */
387
-	return (array) apply_filters( 'give_states_list', $states );
387
+	return (array) apply_filters('give_states_list', $states);
388 388
 }
389 389
 
390 390
 /**
@@ -399,9 +399,9 @@  discard block
 block discarded – undo
399 399
 function give_no_states_country_list() {
400 400
 	$country_list = array();
401 401
 	$locale       = give_get_country_locale();
402
-	foreach ( $locale as $key => $value ) {
403
-		if ( ! empty( $value['state'] ) && isset( $value['state']['hidden'] ) && true === $value['state']['hidden'] ) {
404
-			$country_list[ $key ] = $value['state'];
402
+	foreach ($locale as $key => $value) {
403
+		if ( ! empty($value['state']) && isset($value['state']['hidden']) && true === $value['state']['hidden']) {
404
+			$country_list[$key] = $value['state'];
405 405
 		}
406 406
 	}
407 407
 
@@ -412,7 +412,7 @@  discard block
 block discarded – undo
412 412
 	 *
413 413
 	 * @param array $country Contain key as there country code & value as there country name.
414 414
 	 */
415
-	return (array) apply_filters( 'give_no_states_country_list', $country_list );
415
+	return (array) apply_filters('give_no_states_country_list', $country_list);
416 416
 }
417 417
 
418 418
 /**
@@ -427,9 +427,9 @@  discard block
 block discarded – undo
427 427
 function give_states_not_required_country_list() {
428 428
 	$country_list = array();
429 429
 	$locale       = give_get_country_locale();
430
-	foreach ( $locale as $key => $value ) {
431
-		if ( ! empty( $value['state'] ) && isset( $value['state']['required'] ) && false === $value['state']['required'] ) {
432
-			$country_list[ $key ] = $value['state'];
430
+	foreach ($locale as $key => $value) {
431
+		if ( ! empty($value['state']) && isset($value['state']['required']) && false === $value['state']['required']) {
432
+			$country_list[$key] = $value['state'];
433 433
 		}
434 434
 	}
435 435
 
@@ -440,7 +440,7 @@  discard block
 block discarded – undo
440 440
 	 *
441 441
 	 * @param array $country Contain key as there country code & value as there country name.
442 442
 	 */
443
-	return (array) apply_filters( 'give_states_not_required_country_list', $country_list );
443
+	return (array) apply_filters('give_states_not_required_country_list', $country_list);
444 444
 }
445 445
 
446 446
 /**
@@ -452,11 +452,11 @@  discard block
 block discarded – undo
452 452
  *
453 453
  * @return string|bool
454 454
  */
455
-function give_get_country_name_by_key( $key ) {
455
+function give_get_country_name_by_key($key) {
456 456
 	$country_list = give_get_country_list();
457 457
 
458
-	if ( array_key_exists( $key, $country_list ) ) {
459
-		return $country_list[ $key ];
458
+	if (array_key_exists($key, $country_list)) {
459
+		return $country_list[$key];
460 460
 	}
461 461
 
462 462
 	return false;
@@ -471,14 +471,14 @@  discard block
 block discarded – undo
471 471
  */
472 472
 function give_get_states_label() {
473 473
 	$country_states_label = array();
474
-	$default_label        = __( 'State', 'give' );
474
+	$default_label        = __('State', 'give');
475 475
 	$locale               = give_get_country_locale();
476
-	foreach ( $locale as $key => $value ) {
476
+	foreach ($locale as $key => $value) {
477 477
 		$label = $default_label;
478
-		if ( ! empty( $value['state'] ) && ! empty( $value['state']['label'] ) ) {
478
+		if ( ! empty($value['state']) && ! empty($value['state']['label'])) {
479 479
 			$label = $value['state']['label'];
480 480
 		}
481
-		$country_states_label[ $key ] = $label;
481
+		$country_states_label[$key] = $label;
482 482
 	}
483 483
 
484 484
 	/**
@@ -488,7 +488,7 @@  discard block
 block discarded – undo
488 488
 	 *
489 489
 	 * @param array $country Contain key as there country code & value as there country name.
490 490
 	 */
491
-	return (array) apply_filters( 'give_get_states_label', $country_states_label );
491
+	return (array) apply_filters('give_get_states_label', $country_states_label);
492 492
 }
493 493
 
494 494
 /**
@@ -499,7 +499,7 @@  discard block
 block discarded – undo
499 499
  * @return array
500 500
  */
501 501
 function give_get_country_locale() {
502
-	return (array) apply_filters( 'give_get_country_locale', array(
502
+	return (array) apply_filters('give_get_country_locale', array(
503 503
 		'AE' => array(
504 504
 			'state' => array(
505 505
 				'required' => false,
@@ -519,7 +519,7 @@  discard block
 block discarded – undo
519 519
 		),
520 520
 		'AU' => array(
521 521
 			'state' => array(
522
-				'label' => __( 'State', 'give' ),
522
+				'label' => __('State', 'give'),
523 523
 			),
524 524
 		),
525 525
 		'AX' => array(
@@ -529,13 +529,13 @@  discard block
 block discarded – undo
529 529
 		),
530 530
 		'BD' => array(
531 531
 			'state' => array(
532
-				'label' => __( 'District', 'give' ),
532
+				'label' => __('District', 'give'),
533 533
 			),
534 534
 		),
535 535
 		'BE' => array(
536 536
 			'state' => array(
537 537
 				'required' => false,
538
-				'label'    => __( 'Province', 'give' ),
538
+				'label'    => __('Province', 'give'),
539 539
 				'hidden'   => true,
540 540
 			),
541 541
 		),
@@ -546,24 +546,24 @@  discard block
 block discarded – undo
546 546
 		),
547 547
 		'CA' => array(
548 548
 			'state' => array(
549
-				'label' => __( 'Province', 'give' ),
549
+				'label' => __('Province', 'give'),
550 550
 			),
551 551
 		),
552 552
 		'CH' => array(
553 553
 			'state' => array(
554
-				'label'    => __( 'Canton', 'give' ),
554
+				'label'    => __('Canton', 'give'),
555 555
 				'required' => false,
556 556
 				'hidden'   => true,
557 557
 			),
558 558
 		),
559 559
 		'CL' => array(
560 560
 			'state' => array(
561
-				'label' => __( 'Region', 'give' ),
561
+				'label' => __('Region', 'give'),
562 562
 			),
563 563
 		),
564 564
 		'CN' => array(
565 565
 			'state' => array(
566
-				'label' => __( 'Province', 'give' ),
566
+				'label' => __('Province', 'give'),
567 567
 			),
568 568
 		),
569 569
 		'CZ' => array(
@@ -614,23 +614,23 @@  discard block
 block discarded – undo
614 614
 		),
615 615
 		'HK' => array(
616 616
 			'state' => array(
617
-				'label' => __( 'Region', 'give' ),
617
+				'label' => __('Region', 'give'),
618 618
 			),
619 619
 		),
620 620
 		'HU' => array(
621 621
 			'state' => array(
622
-				'label'  => __( 'County', 'give' ),
622
+				'label'  => __('County', 'give'),
623 623
 				'hidden' => true,
624 624
 			),
625 625
 		),
626 626
 		'ID' => array(
627 627
 			'state' => array(
628
-				'label' => __( 'Province', 'give' ),
628
+				'label' => __('Province', 'give'),
629 629
 			),
630 630
 		),
631 631
 		'IE' => array(
632 632
 			'state' => array(
633
-				'label' => __( 'County', 'give' ),
633
+				'label' => __('County', 'give'),
634 634
 			),
635 635
 		),
636 636
 		'IS' => array(
@@ -647,12 +647,12 @@  discard block
 block discarded – undo
647 647
 		'IT' => array(
648 648
 			'state' => array(
649 649
 				'required' => true,
650
-				'label'    => __( 'Province', 'give' ),
650
+				'label'    => __('Province', 'give'),
651 651
 			),
652 652
 		),
653 653
 		'JP' => array(
654 654
 			'state' => array(
655
-				'label' => __( 'Prefecture', 'give' ),
655
+				'label' => __('Prefecture', 'give'),
656 656
 			),
657 657
 		),
658 658
 		'KR' => array(
@@ -678,14 +678,14 @@  discard block
 block discarded – undo
678 678
 		'NL' => array(
679 679
 			'state' => array(
680 680
 				'required' => false,
681
-				'label'    => __( 'Province', 'give' ),
681
+				'label'    => __('Province', 'give'),
682 682
 				'hidden'   => true,
683 683
 			),
684 684
 		),
685 685
 		'NZ' => array(
686 686
 			'state' => array(
687 687
 				'required' => false,
688
-				'label'    => __( 'Region', 'give' ),
688
+				'label'    => __('Region', 'give'),
689 689
 				'hidden'   => true,
690 690
 			),
691 691
 		),
@@ -697,7 +697,7 @@  discard block
 block discarded – undo
697 697
 		),
698 698
 		'NP' => array(
699 699
 			'state' => array(
700
-				'label' => __( 'State / Zone', 'give' ),
700
+				'label' => __('State / Zone', 'give'),
701 701
 			),
702 702
 		),
703 703
 		'PL' => array(
@@ -741,12 +741,12 @@  discard block
 block discarded – undo
741 741
 		),
742 742
 		'ES' => array(
743 743
 			'state' => array(
744
-				'label' => __( 'Province', 'give' ),
744
+				'label' => __('Province', 'give'),
745 745
 			),
746 746
 		),
747 747
 		'LI' => array(
748 748
 			'state' => array(
749
-				'label'    => __( 'Municipality', 'give' ),
749
+				'label'    => __('Municipality', 'give'),
750 750
 				'required' => false,
751 751
 				'hidden'   => true,
752 752
 			),
@@ -764,17 +764,17 @@  discard block
 block discarded – undo
764 764
 		),
765 765
 		'TR' => array(
766 766
 			'state' => array(
767
-				'label' => __( 'Province', 'give' ),
767
+				'label' => __('Province', 'give'),
768 768
 			),
769 769
 		),
770 770
 		'US' => array(
771 771
 			'state' => array(
772
-				'label' => __( 'State', 'give' ),
772
+				'label' => __('State', 'give'),
773 773
 			),
774 774
 		),
775 775
 		'GB' => array(
776 776
 			'state' => array(
777
-				'label'    => __( 'County', 'give' ),
777
+				'label'    => __('County', 'give'),
778 778
 				'required' => false,
779 779
 			),
780 780
 		),
@@ -791,10 +791,10 @@  discard block
 block discarded – undo
791 791
 		),
792 792
 		'ZA' => array(
793 793
 			'state' => array(
794
-				'label' => __( 'Province', 'give' ),
794
+				'label' => __('Province', 'give'),
795 795
 			),
796 796
 		),
797
-	) );
797
+	));
798 798
 }
799 799
 
800 800
 /**
@@ -806,90 +806,90 @@  discard block
 block discarded – undo
806 806
 function give_get_turkey_states_list() {
807 807
 	$states = array(
808 808
 		''     => '',
809
-		'TR01' => __( 'Adana', 'give' ),
810
-		'TR02' => __( 'Adıyaman', 'give' ),
811
-		'TR03' => __( 'Afyon', 'give' ),
812
-		'TR04' => __( 'Ağrı', 'give' ),
813
-		'TR05' => __( 'Amasya', 'give' ),
814
-		'TR06' => __( 'Ankara', 'give' ),
815
-		'TR07' => __( 'Antalya', 'give' ),
816
-		'TR08' => __( 'Artvin', 'give' ),
817
-		'TR09' => __( 'Aydın', 'give' ),
818
-		'TR10' => __( 'Balıkesir', 'give' ),
819
-		'TR11' => __( 'Bilecik', 'give' ),
820
-		'TR12' => __( 'Bingöl', 'give' ),
821
-		'TR13' => __( 'Bitlis', 'give' ),
822
-		'TR14' => __( 'Bolu', 'give' ),
823
-		'TR15' => __( 'Burdur', 'give' ),
824
-		'TR16' => __( 'Bursa', 'give' ),
825
-		'TR17' => __( 'Çanakkale', 'give' ),
826
-		'TR18' => __( 'Çankırı', 'give' ),
827
-		'TR19' => __( 'Çorum', 'give' ),
828
-		'TR20' => __( 'Denizli', 'give' ),
829
-		'TR21' => __( 'Diyarbakır', 'give' ),
830
-		'TR22' => __( 'Edirne', 'give' ),
831
-		'TR23' => __( 'Elazığ', 'give' ),
832
-		'TR24' => __( 'Erzincan', 'give' ),
833
-		'TR25' => __( 'Erzurum', 'give' ),
834
-		'TR26' => __( 'Eskişehir', 'give' ),
835
-		'TR27' => __( 'Gaziantep', 'give' ),
836
-		'TR28' => __( 'Giresun', 'give' ),
837
-		'TR29' => __( 'Gümüşhane', 'give' ),
838
-		'TR30' => __( 'Hakkari', 'give' ),
839
-		'TR31' => __( 'Hatay', 'give' ),
840
-		'TR32' => __( 'Isparta', 'give' ),
841
-		'TR33' => __( 'İçel', 'give' ),
842
-		'TR34' => __( 'İstanbul', 'give' ),
843
-		'TR35' => __( 'İzmir', 'give' ),
844
-		'TR36' => __( 'Kars', 'give' ),
845
-		'TR37' => __( 'Kastamonu', 'give' ),
846
-		'TR38' => __( 'Kayseri', 'give' ),
847
-		'TR39' => __( 'Kırklareli', 'give' ),
848
-		'TR40' => __( 'Kırşehir', 'give' ),
849
-		'TR41' => __( 'Kocaeli', 'give' ),
850
-		'TR42' => __( 'Konya', 'give' ),
851
-		'TR43' => __( 'Kütahya', 'give' ),
852
-		'TR44' => __( 'Malatya', 'give' ),
853
-		'TR45' => __( 'Manisa', 'give' ),
854
-		'TR46' => __( 'Kahramanmaraş', 'give' ),
855
-		'TR47' => __( 'Mardin', 'give' ),
856
-		'TR48' => __( 'Muğla', 'give' ),
857
-		'TR49' => __( 'Muş', 'give' ),
858
-		'TR50' => __( 'Nevşehir', 'give' ),
859
-		'TR51' => __( 'Niğde', 'give' ),
860
-		'TR52' => __( 'Ordu', 'give' ),
861
-		'TR53' => __( 'Rize', 'give' ),
862
-		'TR54' => __( 'Sakarya', 'give' ),
863
-		'TR55' => __( 'Samsun', 'give' ),
864
-		'TR56' => __( 'Siirt', 'give' ),
865
-		'TR57' => __( 'Sinop', 'give' ),
866
-		'TR58' => __( 'Sivas', 'give' ),
867
-		'TR59' => __( 'Tekirdağ', 'give' ),
868
-		'TR60' => __( 'Tokat', 'give' ),
869
-		'TR61' => __( 'Trabzon', 'give' ),
870
-		'TR62' => __( 'Tunceli', 'give' ),
871
-		'TR63' => __( 'Şanlıurfa', 'give' ),
872
-		'TR64' => __( 'Uşak', 'give' ),
873
-		'TR65' => __( 'Van', 'give' ),
874
-		'TR66' => __( 'Yozgat', 'give' ),
875
-		'TR67' => __( 'Zonguldak', 'give' ),
876
-		'TR68' => __( 'Aksaray', 'give' ),
877
-		'TR69' => __( 'Bayburt', 'give' ),
878
-		'TR70' => __( 'Karaman', 'give' ),
879
-		'TR71' => __( 'Kırıkkale', 'give' ),
880
-		'TR72' => __( 'Batman', 'give' ),
881
-		'TR73' => __( 'Şırnak', 'give' ),
882
-		'TR74' => __( 'Bartın', 'give' ),
883
-		'TR75' => __( 'Ardahan', 'give' ),
884
-		'TR76' => __( 'Iğdır', 'give' ),
885
-		'TR77' => __( 'Yalova', 'give' ),
886
-		'TR78' => __( 'Karabük', 'give' ),
887
-		'TR79' => __( 'Kilis', 'give' ),
888
-		'TR80' => __( 'Osmaniye', 'give' ),
889
-		'TR81' => __( 'Düzce', 'give' ),
809
+		'TR01' => __('Adana', 'give'),
810
+		'TR02' => __('Adıyaman', 'give'),
811
+		'TR03' => __('Afyon', 'give'),
812
+		'TR04' => __('Ağrı', 'give'),
813
+		'TR05' => __('Amasya', 'give'),
814
+		'TR06' => __('Ankara', 'give'),
815
+		'TR07' => __('Antalya', 'give'),
816
+		'TR08' => __('Artvin', 'give'),
817
+		'TR09' => __('Aydın', 'give'),
818
+		'TR10' => __('Balıkesir', 'give'),
819
+		'TR11' => __('Bilecik', 'give'),
820
+		'TR12' => __('Bingöl', 'give'),
821
+		'TR13' => __('Bitlis', 'give'),
822
+		'TR14' => __('Bolu', 'give'),
823
+		'TR15' => __('Burdur', 'give'),
824
+		'TR16' => __('Bursa', 'give'),
825
+		'TR17' => __('Çanakkale', 'give'),
826
+		'TR18' => __('Çankırı', 'give'),
827
+		'TR19' => __('Çorum', 'give'),
828
+		'TR20' => __('Denizli', 'give'),
829
+		'TR21' => __('Diyarbakır', 'give'),
830
+		'TR22' => __('Edirne', 'give'),
831
+		'TR23' => __('Elazığ', 'give'),
832
+		'TR24' => __('Erzincan', 'give'),
833
+		'TR25' => __('Erzurum', 'give'),
834
+		'TR26' => __('Eskişehir', 'give'),
835
+		'TR27' => __('Gaziantep', 'give'),
836
+		'TR28' => __('Giresun', 'give'),
837
+		'TR29' => __('Gümüşhane', 'give'),
838
+		'TR30' => __('Hakkari', 'give'),
839
+		'TR31' => __('Hatay', 'give'),
840
+		'TR32' => __('Isparta', 'give'),
841
+		'TR33' => __('İçel', 'give'),
842
+		'TR34' => __('İstanbul', 'give'),
843
+		'TR35' => __('İzmir', 'give'),
844
+		'TR36' => __('Kars', 'give'),
845
+		'TR37' => __('Kastamonu', 'give'),
846
+		'TR38' => __('Kayseri', 'give'),
847
+		'TR39' => __('Kırklareli', 'give'),
848
+		'TR40' => __('Kırşehir', 'give'),
849
+		'TR41' => __('Kocaeli', 'give'),
850
+		'TR42' => __('Konya', 'give'),
851
+		'TR43' => __('Kütahya', 'give'),
852
+		'TR44' => __('Malatya', 'give'),
853
+		'TR45' => __('Manisa', 'give'),
854
+		'TR46' => __('Kahramanmaraş', 'give'),
855
+		'TR47' => __('Mardin', 'give'),
856
+		'TR48' => __('Muğla', 'give'),
857
+		'TR49' => __('Muş', 'give'),
858
+		'TR50' => __('Nevşehir', 'give'),
859
+		'TR51' => __('Niğde', 'give'),
860
+		'TR52' => __('Ordu', 'give'),
861
+		'TR53' => __('Rize', 'give'),
862
+		'TR54' => __('Sakarya', 'give'),
863
+		'TR55' => __('Samsun', 'give'),
864
+		'TR56' => __('Siirt', 'give'),
865
+		'TR57' => __('Sinop', 'give'),
866
+		'TR58' => __('Sivas', 'give'),
867
+		'TR59' => __('Tekirdağ', 'give'),
868
+		'TR60' => __('Tokat', 'give'),
869
+		'TR61' => __('Trabzon', 'give'),
870
+		'TR62' => __('Tunceli', 'give'),
871
+		'TR63' => __('Şanlıurfa', 'give'),
872
+		'TR64' => __('Uşak', 'give'),
873
+		'TR65' => __('Van', 'give'),
874
+		'TR66' => __('Yozgat', 'give'),
875
+		'TR67' => __('Zonguldak', 'give'),
876
+		'TR68' => __('Aksaray', 'give'),
877
+		'TR69' => __('Bayburt', 'give'),
878
+		'TR70' => __('Karaman', 'give'),
879
+		'TR71' => __('Kırıkkale', 'give'),
880
+		'TR72' => __('Batman', 'give'),
881
+		'TR73' => __('Şırnak', 'give'),
882
+		'TR74' => __('Bartın', 'give'),
883
+		'TR75' => __('Ardahan', 'give'),
884
+		'TR76' => __('Iğdır', 'give'),
885
+		'TR77' => __('Yalova', 'give'),
886
+		'TR78' => __('Karabük', 'give'),
887
+		'TR79' => __('Kilis', 'give'),
888
+		'TR80' => __('Osmaniye', 'give'),
889
+		'TR81' => __('Düzce', 'give'),
890 890
 	);
891 891
 
892
-	return apply_filters( 'give_turkey_states', $states );
892
+	return apply_filters('give_turkey_states', $states);
893 893
 }
894 894
 
895 895
 /**
@@ -901,51 +901,51 @@  discard block
 block discarded – undo
901 901
 function give_get_romania_states_list() {
902 902
 	$states = array(
903 903
 		''   => '',
904
-		'AB' => __( 'Alba', 'give' ),
905
-		'AR' => __( 'Arad', 'give' ),
906
-		'AG' => __( 'Arges', 'give' ),
907
-		'BC' => __( 'Bacau', 'give' ),
908
-		'BH' => __( 'Bihor', 'give' ),
909
-		'BN' => __( 'Bistrita-Nasaud', 'give' ),
910
-		'BT' => __( 'Botosani', 'give' ),
911
-		'BR' => __( 'Braila', 'give' ),
912
-		'BV' => __( 'Brasov', 'give' ),
913
-		'B'  => __( 'Bucuresti', 'give' ),
914
-		'BZ' => __( 'Buzau', 'give' ),
915
-		'CL' => __( 'Calarasi', 'give' ),
916
-		'CS' => __( 'Caras-Severin', 'give' ),
917
-		'CJ' => __( 'Cluj', 'give' ),
918
-		'CT' => __( 'Constanta', 'give' ),
919
-		'CV' => __( 'Covasna', 'give' ),
920
-		'DB' => __( 'Dambovita', 'give' ),
921
-		'DJ' => __( 'Dolj', 'give' ),
922
-		'GL' => __( 'Galati', 'give' ),
923
-		'GR' => __( 'Giurgiu', 'give' ),
924
-		'GJ' => __( 'Gorj', 'give' ),
925
-		'HR' => __( 'Harghita', 'give' ),
926
-		'HD' => __( 'Hunedoara', 'give' ),
927
-		'IL' => __( 'Ialomita', 'give' ),
928
-		'IS' => __( 'Iasi', 'give' ),
929
-		'IF' => __( 'Ilfov', 'give' ),
930
-		'MM' => __( 'Maramures', 'give' ),
931
-		'MH' => __( 'Mehedinti', 'give' ),
932
-		'MS' => __( 'Mures', 'give' ),
933
-		'NT' => __( 'Neamt', 'give' ),
934
-		'OT' => __( 'Olt', 'give' ),
935
-		'PH' => __( 'Prahova', 'give' ),
936
-		'SJ' => __( 'Salaj', 'give' ),
937
-		'SM' => __( 'Satu Mare', 'give' ),
938
-		'SB' => __( 'Sibiu', 'give' ),
939
-		'SV' => __( 'Suceava', 'give' ),
940
-		'TR' => __( 'Teleorman', 'give' ),
941
-		'TM' => __( 'Timis', 'give' ),
942
-		'TL' => __( 'Tulcea', 'give' ),
943
-		'VL' => __( 'Valcea', 'give' ),
944
-		'VS' => __( 'Vaslui', 'give' ),
945
-		'VN' => __( 'Vrancea', 'give' ),
904
+		'AB' => __('Alba', 'give'),
905
+		'AR' => __('Arad', 'give'),
906
+		'AG' => __('Arges', 'give'),
907
+		'BC' => __('Bacau', 'give'),
908
+		'BH' => __('Bihor', 'give'),
909
+		'BN' => __('Bistrita-Nasaud', 'give'),
910
+		'BT' => __('Botosani', 'give'),
911
+		'BR' => __('Braila', 'give'),
912
+		'BV' => __('Brasov', 'give'),
913
+		'B'  => __('Bucuresti', 'give'),
914
+		'BZ' => __('Buzau', 'give'),
915
+		'CL' => __('Calarasi', 'give'),
916
+		'CS' => __('Caras-Severin', 'give'),
917
+		'CJ' => __('Cluj', 'give'),
918
+		'CT' => __('Constanta', 'give'),
919
+		'CV' => __('Covasna', 'give'),
920
+		'DB' => __('Dambovita', 'give'),
921
+		'DJ' => __('Dolj', 'give'),
922
+		'GL' => __('Galati', 'give'),
923
+		'GR' => __('Giurgiu', 'give'),
924
+		'GJ' => __('Gorj', 'give'),
925
+		'HR' => __('Harghita', 'give'),
926
+		'HD' => __('Hunedoara', 'give'),
927
+		'IL' => __('Ialomita', 'give'),
928
+		'IS' => __('Iasi', 'give'),
929
+		'IF' => __('Ilfov', 'give'),
930
+		'MM' => __('Maramures', 'give'),
931
+		'MH' => __('Mehedinti', 'give'),
932
+		'MS' => __('Mures', 'give'),
933
+		'NT' => __('Neamt', 'give'),
934
+		'OT' => __('Olt', 'give'),
935
+		'PH' => __('Prahova', 'give'),
936
+		'SJ' => __('Salaj', 'give'),
937
+		'SM' => __('Satu Mare', 'give'),
938
+		'SB' => __('Sibiu', 'give'),
939
+		'SV' => __('Suceava', 'give'),
940
+		'TR' => __('Teleorman', 'give'),
941
+		'TM' => __('Timis', 'give'),
942
+		'TL' => __('Tulcea', 'give'),
943
+		'VL' => __('Valcea', 'give'),
944
+		'VS' => __('Vaslui', 'give'),
945
+		'VN' => __('Vrancea', 'give'),
946 946
 	);
947 947
 
948
-	return apply_filters( 'give_romania_states', $states );
948
+	return apply_filters('give_romania_states', $states);
949 949
 }
950 950
 
951 951
 /**
@@ -957,17 +957,17 @@  discard block
 block discarded – undo
957 957
 function give_get_pakistan_states_list() {
958 958
 	$states = array(
959 959
 		''   => '',
960
-		'JK' => __( 'Azad Kashmir', 'give' ),
961
-		'BA' => __( 'Balochistan', 'give' ),
962
-		'TA' => __( 'FATA', 'give' ),
963
-		'GB' => __( 'Gilgit Baltistan', 'give' ),
964
-		'IS' => __( 'Islamabad Capital Territory', 'give' ),
965
-		'KP' => __( 'Khyber Pakhtunkhwa', 'give' ),
966
-		'PB' => __( 'Punjab', 'give' ),
967
-		'SD' => __( 'Sindh', 'give' ),
960
+		'JK' => __('Azad Kashmir', 'give'),
961
+		'BA' => __('Balochistan', 'give'),
962
+		'TA' => __('FATA', 'give'),
963
+		'GB' => __('Gilgit Baltistan', 'give'),
964
+		'IS' => __('Islamabad Capital Territory', 'give'),
965
+		'KP' => __('Khyber Pakhtunkhwa', 'give'),
966
+		'PB' => __('Punjab', 'give'),
967
+		'SD' => __('Sindh', 'give'),
968 968
 	);
969 969
 
970
-	return apply_filters( 'give_pakistan_states', $states );
970
+	return apply_filters('give_pakistan_states', $states);
971 971
 }
972 972
 
973 973
 /**
@@ -979,91 +979,91 @@  discard block
 block discarded – undo
979 979
 function give_get_philippines_states_list() {
980 980
 	$states = array(
981 981
 		''    => '',
982
-		'ABR' => __( 'Abra', 'give' ),
983
-		'AGN' => __( 'Agusan del Norte', 'give' ),
984
-		'AGS' => __( 'Agusan del Sur', 'give' ),
985
-		'AKL' => __( 'Aklan', 'give' ),
986
-		'ALB' => __( 'Albay', 'give' ),
987
-		'ANT' => __( 'Antique', 'give' ),
988
-		'APA' => __( 'Apayao', 'give' ),
989
-		'AUR' => __( 'Aurora', 'give' ),
990
-		'BAS' => __( 'Basilan', 'give' ),
991
-		'BAN' => __( 'Bataan', 'give' ),
992
-		'BTN' => __( 'Batanes', 'give' ),
993
-		'BTG' => __( 'Batangas', 'give' ),
994
-		'BEN' => __( 'Benguet', 'give' ),
995
-		'BIL' => __( 'Biliran', 'give' ),
996
-		'BOH' => __( 'Bohol', 'give' ),
997
-		'BUK' => __( 'Bukidnon', 'give' ),
998
-		'BUL' => __( 'Bulacan', 'give' ),
999
-		'CAG' => __( 'Cagayan', 'give' ),
1000
-		'CAN' => __( 'Camarines Norte', 'give' ),
1001
-		'CAS' => __( 'Camarines Sur', 'give' ),
1002
-		'CAM' => __( 'Camiguin', 'give' ),
1003
-		'CAP' => __( 'Capiz', 'give' ),
1004
-		'CAT' => __( 'Catanduanes', 'give' ),
1005
-		'CAV' => __( 'Cavite', 'give' ),
1006
-		'CEB' => __( 'Cebu', 'give' ),
1007
-		'COM' => __( 'Compostela Valley', 'give' ),
1008
-		'NCO' => __( 'Cotabato', 'give' ),
1009
-		'DAV' => __( 'Davao del Norte', 'give' ),
1010
-		'DAS' => __( 'Davao del Sur', 'give' ),
1011
-		'DAC' => __( 'Davao Occidental', 'give' ), // TODO: Needs to be updated when ISO code is assigned
1012
-		'DAO' => __( 'Davao Oriental', 'give' ),
1013
-		'DIN' => __( 'Dinagat Islands', 'give' ),
1014
-		'EAS' => __( 'Eastern Samar', 'give' ),
1015
-		'GUI' => __( 'Guimaras', 'give' ),
1016
-		'IFU' => __( 'Ifugao', 'give' ),
1017
-		'ILN' => __( 'Ilocos Norte', 'give' ),
1018
-		'ILS' => __( 'Ilocos Sur', 'give' ),
1019
-		'ILI' => __( 'Iloilo', 'give' ),
1020
-		'ISA' => __( 'Isabela', 'give' ),
1021
-		'KAL' => __( 'Kalinga', 'give' ),
1022
-		'LUN' => __( 'La Union', 'give' ),
1023
-		'LAG' => __( 'Laguna', 'give' ),
1024
-		'LAN' => __( 'Lanao del Norte', 'give' ),
1025
-		'LAS' => __( 'Lanao del Sur', 'give' ),
1026
-		'LEY' => __( 'Leyte', 'give' ),
1027
-		'MAG' => __( 'Maguindanao', 'give' ),
1028
-		'MAD' => __( 'Marinduque', 'give' ),
1029
-		'MAS' => __( 'Masbate', 'give' ),
1030
-		'MSC' => __( 'Misamis Occidental', 'give' ),
1031
-		'MSR' => __( 'Misamis Oriental', 'give' ),
1032
-		'MOU' => __( 'Mountain Province', 'give' ),
1033
-		'NEC' => __( 'Negros Occidental', 'give' ),
1034
-		'NER' => __( 'Negros Oriental', 'give' ),
1035
-		'NSA' => __( 'Northern Samar', 'give' ),
1036
-		'NUE' => __( 'Nueva Ecija', 'give' ),
1037
-		'NUV' => __( 'Nueva Vizcaya', 'give' ),
1038
-		'MDC' => __( 'Occidental Mindoro', 'give' ),
1039
-		'MDR' => __( 'Oriental Mindoro', 'give' ),
1040
-		'PLW' => __( 'Palawan', 'give' ),
1041
-		'PAM' => __( 'Pampanga', 'give' ),
1042
-		'PAN' => __( 'Pangasinan', 'give' ),
1043
-		'QUE' => __( 'Quezon', 'give' ),
1044
-		'QUI' => __( 'Quirino', 'give' ),
1045
-		'RIZ' => __( 'Rizal', 'give' ),
1046
-		'ROM' => __( 'Romblon', 'give' ),
1047
-		'WSA' => __( 'Samar', 'give' ),
1048
-		'SAR' => __( 'Sarangani', 'give' ),
1049
-		'SIQ' => __( 'Siquijor', 'give' ),
1050
-		'SOR' => __( 'Sorsogon', 'give' ),
1051
-		'SCO' => __( 'South Cotabato', 'give' ),
1052
-		'SLE' => __( 'Southern Leyte', 'give' ),
1053
-		'SUK' => __( 'Sultan Kudarat', 'give' ),
1054
-		'SLU' => __( 'Sulu', 'give' ),
1055
-		'SUN' => __( 'Surigao del Norte', 'give' ),
1056
-		'SUR' => __( 'Surigao del Sur', 'give' ),
1057
-		'TAR' => __( 'Tarlac', 'give' ),
1058
-		'TAW' => __( 'Tawi-Tawi', 'give' ),
1059
-		'ZMB' => __( 'Zambales', 'give' ),
1060
-		'ZAN' => __( 'Zamboanga del Norte', 'give' ),
1061
-		'ZAS' => __( 'Zamboanga del Sur', 'give' ),
1062
-		'ZSI' => __( 'Zamboanga Sibugay', 'give' ),
1063
-		'00'  => __( 'Metro Manila', 'give' ),
982
+		'ABR' => __('Abra', 'give'),
983
+		'AGN' => __('Agusan del Norte', 'give'),
984
+		'AGS' => __('Agusan del Sur', 'give'),
985
+		'AKL' => __('Aklan', 'give'),
986
+		'ALB' => __('Albay', 'give'),
987
+		'ANT' => __('Antique', 'give'),
988
+		'APA' => __('Apayao', 'give'),
989
+		'AUR' => __('Aurora', 'give'),
990
+		'BAS' => __('Basilan', 'give'),
991
+		'BAN' => __('Bataan', 'give'),
992
+		'BTN' => __('Batanes', 'give'),
993
+		'BTG' => __('Batangas', 'give'),
994
+		'BEN' => __('Benguet', 'give'),
995
+		'BIL' => __('Biliran', 'give'),
996
+		'BOH' => __('Bohol', 'give'),
997
+		'BUK' => __('Bukidnon', 'give'),
998
+		'BUL' => __('Bulacan', 'give'),
999
+		'CAG' => __('Cagayan', 'give'),
1000
+		'CAN' => __('Camarines Norte', 'give'),
1001
+		'CAS' => __('Camarines Sur', 'give'),
1002
+		'CAM' => __('Camiguin', 'give'),
1003
+		'CAP' => __('Capiz', 'give'),
1004
+		'CAT' => __('Catanduanes', 'give'),
1005
+		'CAV' => __('Cavite', 'give'),
1006
+		'CEB' => __('Cebu', 'give'),
1007
+		'COM' => __('Compostela Valley', 'give'),
1008
+		'NCO' => __('Cotabato', 'give'),
1009
+		'DAV' => __('Davao del Norte', 'give'),
1010
+		'DAS' => __('Davao del Sur', 'give'),
1011
+		'DAC' => __('Davao Occidental', 'give'), // TODO: Needs to be updated when ISO code is assigned
1012
+		'DAO' => __('Davao Oriental', 'give'),
1013
+		'DIN' => __('Dinagat Islands', 'give'),
1014
+		'EAS' => __('Eastern Samar', 'give'),
1015
+		'GUI' => __('Guimaras', 'give'),
1016
+		'IFU' => __('Ifugao', 'give'),
1017
+		'ILN' => __('Ilocos Norte', 'give'),
1018
+		'ILS' => __('Ilocos Sur', 'give'),
1019
+		'ILI' => __('Iloilo', 'give'),
1020
+		'ISA' => __('Isabela', 'give'),
1021
+		'KAL' => __('Kalinga', 'give'),
1022
+		'LUN' => __('La Union', 'give'),
1023
+		'LAG' => __('Laguna', 'give'),
1024
+		'LAN' => __('Lanao del Norte', 'give'),
1025
+		'LAS' => __('Lanao del Sur', 'give'),
1026
+		'LEY' => __('Leyte', 'give'),
1027
+		'MAG' => __('Maguindanao', 'give'),
1028
+		'MAD' => __('Marinduque', 'give'),
1029
+		'MAS' => __('Masbate', 'give'),
1030
+		'MSC' => __('Misamis Occidental', 'give'),
1031
+		'MSR' => __('Misamis Oriental', 'give'),
1032
+		'MOU' => __('Mountain Province', 'give'),
1033
+		'NEC' => __('Negros Occidental', 'give'),
1034
+		'NER' => __('Negros Oriental', 'give'),
1035
+		'NSA' => __('Northern Samar', 'give'),
1036
+		'NUE' => __('Nueva Ecija', 'give'),
1037
+		'NUV' => __('Nueva Vizcaya', 'give'),
1038
+		'MDC' => __('Occidental Mindoro', 'give'),
1039
+		'MDR' => __('Oriental Mindoro', 'give'),
1040
+		'PLW' => __('Palawan', 'give'),
1041
+		'PAM' => __('Pampanga', 'give'),
1042
+		'PAN' => __('Pangasinan', 'give'),
1043
+		'QUE' => __('Quezon', 'give'),
1044
+		'QUI' => __('Quirino', 'give'),
1045
+		'RIZ' => __('Rizal', 'give'),
1046
+		'ROM' => __('Romblon', 'give'),
1047
+		'WSA' => __('Samar', 'give'),
1048
+		'SAR' => __('Sarangani', 'give'),
1049
+		'SIQ' => __('Siquijor', 'give'),
1050
+		'SOR' => __('Sorsogon', 'give'),
1051
+		'SCO' => __('South Cotabato', 'give'),
1052
+		'SLE' => __('Southern Leyte', 'give'),
1053
+		'SUK' => __('Sultan Kudarat', 'give'),
1054
+		'SLU' => __('Sulu', 'give'),
1055
+		'SUN' => __('Surigao del Norte', 'give'),
1056
+		'SUR' => __('Surigao del Sur', 'give'),
1057
+		'TAR' => __('Tarlac', 'give'),
1058
+		'TAW' => __('Tawi-Tawi', 'give'),
1059
+		'ZMB' => __('Zambales', 'give'),
1060
+		'ZAN' => __('Zamboanga del Norte', 'give'),
1061
+		'ZAS' => __('Zamboanga del Sur', 'give'),
1062
+		'ZSI' => __('Zamboanga Sibugay', 'give'),
1063
+		'00'  => __('Metro Manila', 'give'),
1064 1064
 	);
1065 1065
 
1066
-	return apply_filters( 'give_philippines_states', $states );
1066
+	return apply_filters('give_philippines_states', $states);
1067 1067
 }
1068 1068
 
1069 1069
 /**
@@ -1075,35 +1075,35 @@  discard block
 block discarded – undo
1075 1075
 function give_get_peru_states_list() {
1076 1076
 	$states = array(
1077 1077
 		''    => '',
1078
-		'CAL' => __( 'El Callao', 'give' ),
1079
-		'LMA' => __( 'Municipalidad Metropolitana de Lima', 'give' ),
1080
-		'AMA' => __( 'Amazonas', 'give' ),
1081
-		'ANC' => __( 'Ancash', 'give' ),
1082
-		'APU' => __( 'Apurímac', 'give' ),
1083
-		'ARE' => __( 'Arequipa', 'give' ),
1084
-		'AYA' => __( 'Ayacucho', 'give' ),
1085
-		'CAJ' => __( 'Cajamarca', 'give' ),
1086
-		'CUS' => __( 'Cusco', 'give' ),
1087
-		'HUV' => __( 'Huancavelica', 'give' ),
1088
-		'HUC' => __( 'Huánuco', 'give' ),
1089
-		'ICA' => __( 'Ica', 'give' ),
1090
-		'JUN' => __( 'Junín', 'give' ),
1091
-		'LAL' => __( 'La Libertad', 'give' ),
1092
-		'LAM' => __( 'Lambayeque', 'give' ),
1093
-		'LIM' => __( 'Lima', 'give' ),
1094
-		'LOR' => __( 'Loreto', 'give' ),
1095
-		'MDD' => __( 'Madre de Dios', 'give' ),
1096
-		'MOQ' => __( 'Moquegua', 'give' ),
1097
-		'PAS' => __( 'Pasco', 'give' ),
1098
-		'PIU' => __( 'Piura', 'give' ),
1099
-		'PUN' => __( 'Puno', 'give' ),
1100
-		'SAM' => __( 'San Martín', 'give' ),
1101
-		'TAC' => __( 'Tacna', 'give' ),
1102
-		'TUM' => __( 'Tumbes', 'give' ),
1103
-		'UCA' => __( 'Ucayali', 'give' ),
1078
+		'CAL' => __('El Callao', 'give'),
1079
+		'LMA' => __('Municipalidad Metropolitana de Lima', 'give'),
1080
+		'AMA' => __('Amazonas', 'give'),
1081
+		'ANC' => __('Ancash', 'give'),
1082
+		'APU' => __('Apurímac', 'give'),
1083
+		'ARE' => __('Arequipa', 'give'),
1084
+		'AYA' => __('Ayacucho', 'give'),
1085
+		'CAJ' => __('Cajamarca', 'give'),
1086
+		'CUS' => __('Cusco', 'give'),
1087
+		'HUV' => __('Huancavelica', 'give'),
1088
+		'HUC' => __('Huánuco', 'give'),
1089
+		'ICA' => __('Ica', 'give'),
1090
+		'JUN' => __('Junín', 'give'),
1091
+		'LAL' => __('La Libertad', 'give'),
1092
+		'LAM' => __('Lambayeque', 'give'),
1093
+		'LIM' => __('Lima', 'give'),
1094
+		'LOR' => __('Loreto', 'give'),
1095
+		'MDD' => __('Madre de Dios', 'give'),
1096
+		'MOQ' => __('Moquegua', 'give'),
1097
+		'PAS' => __('Pasco', 'give'),
1098
+		'PIU' => __('Piura', 'give'),
1099
+		'PUN' => __('Puno', 'give'),
1100
+		'SAM' => __('San Martín', 'give'),
1101
+		'TAC' => __('Tacna', 'give'),
1102
+		'TUM' => __('Tumbes', 'give'),
1103
+		'UCA' => __('Ucayali', 'give'),
1104 1104
 	);
1105 1105
 
1106
-	return apply_filters( 'give_peru_states', $states );
1106
+	return apply_filters('give_peru_states', $states);
1107 1107
 }
1108 1108
 
1109 1109
 /**
@@ -1115,23 +1115,23 @@  discard block
 block discarded – undo
1115 1115
 function give_get_nepal_states_list() {
1116 1116
 	$states = array(
1117 1117
 		''    => '',
1118
-		'BAG' => __( 'Bagmati', 'give' ),
1119
-		'BHE' => __( 'Bheri', 'give' ),
1120
-		'DHA' => __( 'Dhaulagiri', 'give' ),
1121
-		'GAN' => __( 'Gandaki', 'give' ),
1122
-		'JAN' => __( 'Janakpur', 'give' ),
1123
-		'KAR' => __( 'Karnali', 'give' ),
1124
-		'KOS' => __( 'Koshi', 'give' ),
1125
-		'LUM' => __( 'Lumbini', 'give' ),
1126
-		'MAH' => __( 'Mahakali', 'give' ),
1127
-		'MEC' => __( 'Mechi', 'give' ),
1128
-		'NAR' => __( 'Narayani', 'give' ),
1129
-		'RAP' => __( 'Rapti', 'give' ),
1130
-		'SAG' => __( 'Sagarmatha', 'give' ),
1131
-		'SET' => __( 'Seti', 'give' ),
1118
+		'BAG' => __('Bagmati', 'give'),
1119
+		'BHE' => __('Bheri', 'give'),
1120
+		'DHA' => __('Dhaulagiri', 'give'),
1121
+		'GAN' => __('Gandaki', 'give'),
1122
+		'JAN' => __('Janakpur', 'give'),
1123
+		'KAR' => __('Karnali', 'give'),
1124
+		'KOS' => __('Koshi', 'give'),
1125
+		'LUM' => __('Lumbini', 'give'),
1126
+		'MAH' => __('Mahakali', 'give'),
1127
+		'MEC' => __('Mechi', 'give'),
1128
+		'NAR' => __('Narayani', 'give'),
1129
+		'RAP' => __('Rapti', 'give'),
1130
+		'SAG' => __('Sagarmatha', 'give'),
1131
+		'SET' => __('Seti', 'give'),
1132 1132
 	);
1133 1133
 
1134
-	return apply_filters( 'give_nepal_states', $states );
1134
+	return apply_filters('give_nepal_states', $states);
1135 1135
 }
1136 1136
 
1137 1137
 /**
@@ -1143,46 +1143,46 @@  discard block
 block discarded – undo
1143 1143
 function give_get_nigerian_states_list() {
1144 1144
 	$states = array(
1145 1145
 		''   => '',
1146
-		'AB' => __( 'Abia', 'give' ),
1147
-		'FC' => __( 'Abuja', 'give' ),
1148
-		'AD' => __( 'Adamawa', 'give' ),
1149
-		'AK' => __( 'Akwa Ibom', 'give' ),
1150
-		'AN' => __( 'Anambra', 'give' ),
1151
-		'BA' => __( 'Bauchi', 'give' ),
1152
-		'BY' => __( 'Bayelsa', 'give' ),
1153
-		'BE' => __( 'Benue', 'give' ),
1154
-		'BO' => __( 'Borno', 'give' ),
1155
-		'CR' => __( 'Cross River', 'give' ),
1156
-		'DE' => __( 'Delta', 'give' ),
1157
-		'EB' => __( 'Ebonyi', 'give' ),
1158
-		'ED' => __( 'Edo', 'give' ),
1159
-		'EK' => __( 'Ekiti', 'give' ),
1160
-		'EN' => __( 'Enugu', 'give' ),
1161
-		'GO' => __( 'Gombe', 'give' ),
1162
-		'IM' => __( 'Imo', 'give' ),
1163
-		'JI' => __( 'Jigawa', 'give' ),
1164
-		'KD' => __( 'Kaduna', 'give' ),
1165
-		'KN' => __( 'Kano', 'give' ),
1166
-		'KT' => __( 'Katsina', 'give' ),
1167
-		'KE' => __( 'Kebbi', 'give' ),
1168
-		'KO' => __( 'Kogi', 'give' ),
1169
-		'KW' => __( 'Kwara', 'give' ),
1170
-		'LA' => __( 'Lagos', 'give' ),
1171
-		'NA' => __( 'Nasarawa', 'give' ),
1172
-		'NI' => __( 'Niger', 'give' ),
1173
-		'OG' => __( 'Ogun', 'give' ),
1174
-		'ON' => __( 'Ondo', 'give' ),
1175
-		'OS' => __( 'Osun', 'give' ),
1176
-		'OY' => __( 'Oyo', 'give' ),
1177
-		'PL' => __( 'Plateau', 'give' ),
1178
-		'RI' => __( 'Rivers', 'give' ),
1179
-		'SO' => __( 'Sokoto', 'give' ),
1180
-		'TA' => __( 'Taraba', 'give' ),
1181
-		'YO' => __( 'Yobe', 'give' ),
1182
-		'ZA' => __( 'Zamfara', 'give' ),
1146
+		'AB' => __('Abia', 'give'),
1147
+		'FC' => __('Abuja', 'give'),
1148
+		'AD' => __('Adamawa', 'give'),
1149
+		'AK' => __('Akwa Ibom', 'give'),
1150
+		'AN' => __('Anambra', 'give'),
1151
+		'BA' => __('Bauchi', 'give'),
1152
+		'BY' => __('Bayelsa', 'give'),
1153
+		'BE' => __('Benue', 'give'),
1154
+		'BO' => __('Borno', 'give'),
1155
+		'CR' => __('Cross River', 'give'),
1156
+		'DE' => __('Delta', 'give'),
1157
+		'EB' => __('Ebonyi', 'give'),
1158
+		'ED' => __('Edo', 'give'),
1159
+		'EK' => __('Ekiti', 'give'),
1160
+		'EN' => __('Enugu', 'give'),
1161
+		'GO' => __('Gombe', 'give'),
1162
+		'IM' => __('Imo', 'give'),
1163
+		'JI' => __('Jigawa', 'give'),
1164
+		'KD' => __('Kaduna', 'give'),
1165
+		'KN' => __('Kano', 'give'),
1166
+		'KT' => __('Katsina', 'give'),
1167
+		'KE' => __('Kebbi', 'give'),
1168
+		'KO' => __('Kogi', 'give'),
1169
+		'KW' => __('Kwara', 'give'),
1170
+		'LA' => __('Lagos', 'give'),
1171
+		'NA' => __('Nasarawa', 'give'),
1172
+		'NI' => __('Niger', 'give'),
1173
+		'OG' => __('Ogun', 'give'),
1174
+		'ON' => __('Ondo', 'give'),
1175
+		'OS' => __('Osun', 'give'),
1176
+		'OY' => __('Oyo', 'give'),
1177
+		'PL' => __('Plateau', 'give'),
1178
+		'RI' => __('Rivers', 'give'),
1179
+		'SO' => __('Sokoto', 'give'),
1180
+		'TA' => __('Taraba', 'give'),
1181
+		'YO' => __('Yobe', 'give'),
1182
+		'ZA' => __('Zamfara', 'give'),
1183 1183
 	);
1184 1184
 
1185
-	return apply_filters( 'give_nigerian_states', $states );
1185
+	return apply_filters('give_nigerian_states', $states);
1186 1186
 }
1187 1187
 
1188 1188
 /**
@@ -1194,41 +1194,41 @@  discard block
 block discarded – undo
1194 1194
 function give_get_mexico_states_list() {
1195 1195
 	$states = array(
1196 1196
 		''                    => '',
1197
-		'Distrito Federal'    => __( 'Distrito Federal', 'give' ),
1198
-		'Jalisco'             => __( 'Jalisco', 'give' ),
1199
-		'Nuevo Leon'          => __( 'Nuevo León', 'give' ),
1200
-		'Aguascalientes'      => __( 'Aguascalientes', 'give' ),
1201
-		'Baja California'     => __( 'Baja California', 'give' ),
1202
-		'Baja California Sur' => __( 'Baja California Sur', 'give' ),
1203
-		'Campeche'            => __( 'Campeche', 'give' ),
1204
-		'Chiapas'             => __( 'Chiapas', 'give' ),
1205
-		'Chihuahua'           => __( 'Chihuahua', 'give' ),
1206
-		'Coahuila'            => __( 'Coahuila', 'give' ),
1207
-		'Colima'              => __( 'Colima', 'give' ),
1208
-		'Durango'             => __( 'Durango', 'give' ),
1209
-		'Guanajuato'          => __( 'Guanajuato', 'give' ),
1210
-		'Guerrero'            => __( 'Guerrero', 'give' ),
1211
-		'Hidalgo'             => __( 'Hidalgo', 'give' ),
1212
-		'Estado de Mexico'    => __( 'Edo. de México', 'give' ),
1213
-		'Michoacan'           => __( 'Michoacán', 'give' ),
1214
-		'Morelos'             => __( 'Morelos', 'give' ),
1215
-		'Nayarit'             => __( 'Nayarit', 'give' ),
1216
-		'Oaxaca'              => __( 'Oaxaca', 'give' ),
1217
-		'Puebla'              => __( 'Puebla', 'give' ),
1218
-		'Queretaro'           => __( 'Querétaro', 'give' ),
1219
-		'Quintana Roo'        => __( 'Quintana Roo', 'give' ),
1220
-		'San Luis Potosi'     => __( 'San Luis Potosí', 'give' ),
1221
-		'Sinaloa'             => __( 'Sinaloa', 'give' ),
1222
-		'Sonora'              => __( 'Sonora', 'give' ),
1223
-		'Tabasco'             => __( 'Tabasco', 'give' ),
1224
-		'Tamaulipas'          => __( 'Tamaulipas', 'give' ),
1225
-		'Tlaxcala'            => __( 'Tlaxcala', 'give' ),
1226
-		'Veracruz'            => __( 'Veracruz', 'give' ),
1227
-		'Yucatan'             => __( 'Yucatán', 'give' ),
1228
-		'Zacatecas'           => __( 'Zacatecas', 'give' ),
1197
+		'Distrito Federal'    => __('Distrito Federal', 'give'),
1198
+		'Jalisco'             => __('Jalisco', 'give'),
1199
+		'Nuevo Leon'          => __('Nuevo León', 'give'),
1200
+		'Aguascalientes'      => __('Aguascalientes', 'give'),
1201
+		'Baja California'     => __('Baja California', 'give'),
1202
+		'Baja California Sur' => __('Baja California Sur', 'give'),
1203
+		'Campeche'            => __('Campeche', 'give'),
1204
+		'Chiapas'             => __('Chiapas', 'give'),
1205
+		'Chihuahua'           => __('Chihuahua', 'give'),
1206
+		'Coahuila'            => __('Coahuila', 'give'),
1207
+		'Colima'              => __('Colima', 'give'),
1208
+		'Durango'             => __('Durango', 'give'),
1209
+		'Guanajuato'          => __('Guanajuato', 'give'),
1210
+		'Guerrero'            => __('Guerrero', 'give'),
1211
+		'Hidalgo'             => __('Hidalgo', 'give'),
1212
+		'Estado de Mexico'    => __('Edo. de México', 'give'),
1213
+		'Michoacan'           => __('Michoacán', 'give'),
1214
+		'Morelos'             => __('Morelos', 'give'),
1215
+		'Nayarit'             => __('Nayarit', 'give'),
1216
+		'Oaxaca'              => __('Oaxaca', 'give'),
1217
+		'Puebla'              => __('Puebla', 'give'),
1218
+		'Queretaro'           => __('Querétaro', 'give'),
1219
+		'Quintana Roo'        => __('Quintana Roo', 'give'),
1220
+		'San Luis Potosi'     => __('San Luis Potosí', 'give'),
1221
+		'Sinaloa'             => __('Sinaloa', 'give'),
1222
+		'Sonora'              => __('Sonora', 'give'),
1223
+		'Tabasco'             => __('Tabasco', 'give'),
1224
+		'Tamaulipas'          => __('Tamaulipas', 'give'),
1225
+		'Tlaxcala'            => __('Tlaxcala', 'give'),
1226
+		'Veracruz'            => __('Veracruz', 'give'),
1227
+		'Yucatan'             => __('Yucatán', 'give'),
1228
+		'Zacatecas'           => __('Zacatecas', 'give'),
1229 1229
 	);
1230 1230
 
1231
-	return apply_filters( 'give_mexico_states', $states );
1231
+	return apply_filters('give_mexico_states', $states);
1232 1232
 }
1233 1233
 
1234 1234
 /**
@@ -1240,56 +1240,56 @@  discard block
 block discarded – undo
1240 1240
 function give_get_japan_states_list() {
1241 1241
 	$states = array(
1242 1242
 		''     => '',
1243
-		'JP01' => __( 'Hokkaido', 'give' ),
1244
-		'JP02' => __( 'Aomori', 'give' ),
1245
-		'JP03' => __( 'Iwate', 'give' ),
1246
-		'JP04' => __( 'Miyagi', 'give' ),
1247
-		'JP05' => __( 'Akita', 'give' ),
1248
-		'JP06' => __( 'Yamagata', 'give' ),
1249
-		'JP07' => __( 'Fukushima', 'give' ),
1250
-		'JP08' => __( 'Ibaraki', 'give' ),
1251
-		'JP09' => __( 'Tochigi', 'give' ),
1252
-		'JP10' => __( 'Gunma', 'give' ),
1253
-		'JP11' => __( 'Saitama', 'give' ),
1254
-		'JP12' => __( 'Chiba', 'give' ),
1255
-		'JP13' => __( 'Tokyo', 'give' ),
1256
-		'JP14' => __( 'Kanagawa', 'give' ),
1257
-		'JP15' => __( 'Niigata', 'give' ),
1258
-		'JP16' => __( 'Toyama', 'give' ),
1259
-		'JP17' => __( 'Ishikawa', 'give' ),
1260
-		'JP18' => __( 'Fukui', 'give' ),
1261
-		'JP19' => __( 'Yamanashi', 'give' ),
1262
-		'JP20' => __( 'Nagano', 'give' ),
1263
-		'JP21' => __( 'Gifu', 'give' ),
1264
-		'JP22' => __( 'Shizuoka', 'give' ),
1265
-		'JP23' => __( 'Aichi', 'give' ),
1266
-		'JP24' => __( 'Mie', 'give' ),
1267
-		'JP25' => __( 'Shiga', 'give' ),
1268
-		'JP26' => __( 'Kyoto', 'give' ),
1269
-		'JP27' => __( 'Osaka', 'give' ),
1270
-		'JP28' => __( 'Hyogo', 'give' ),
1271
-		'JP29' => __( 'Nara', 'give' ),
1272
-		'JP30' => __( 'Wakayama', 'give' ),
1273
-		'JP31' => __( 'Tottori', 'give' ),
1274
-		'JP32' => __( 'Shimane', 'give' ),
1275
-		'JP33' => __( 'Okayama', 'give' ),
1276
-		'JP34' => __( 'Hiroshima', 'give' ),
1277
-		'JP35' => __( 'Yamaguchi', 'give' ),
1278
-		'JP36' => __( 'Tokushima', 'give' ),
1279
-		'JP37' => __( 'Kagawa', 'give' ),
1280
-		'JP38' => __( 'Ehime', 'give' ),
1281
-		'JP39' => __( 'Kochi', 'give' ),
1282
-		'JP40' => __( 'Fukuoka', 'give' ),
1283
-		'JP41' => __( 'Saga', 'give' ),
1284
-		'JP42' => __( 'Nagasaki', 'give' ),
1285
-		'JP43' => __( 'Kumamoto', 'give' ),
1286
-		'JP44' => __( 'Oita', 'give' ),
1287
-		'JP45' => __( 'Miyazaki', 'give' ),
1288
-		'JP46' => __( 'Kagoshima', 'give' ),
1289
-		'JP47' => __( 'Okinawa', 'give' ),
1243
+		'JP01' => __('Hokkaido', 'give'),
1244
+		'JP02' => __('Aomori', 'give'),
1245
+		'JP03' => __('Iwate', 'give'),
1246
+		'JP04' => __('Miyagi', 'give'),
1247
+		'JP05' => __('Akita', 'give'),
1248
+		'JP06' => __('Yamagata', 'give'),
1249
+		'JP07' => __('Fukushima', 'give'),
1250
+		'JP08' => __('Ibaraki', 'give'),
1251
+		'JP09' => __('Tochigi', 'give'),
1252
+		'JP10' => __('Gunma', 'give'),
1253
+		'JP11' => __('Saitama', 'give'),
1254
+		'JP12' => __('Chiba', 'give'),
1255
+		'JP13' => __('Tokyo', 'give'),
1256
+		'JP14' => __('Kanagawa', 'give'),
1257
+		'JP15' => __('Niigata', 'give'),
1258
+		'JP16' => __('Toyama', 'give'),
1259
+		'JP17' => __('Ishikawa', 'give'),
1260
+		'JP18' => __('Fukui', 'give'),
1261
+		'JP19' => __('Yamanashi', 'give'),
1262
+		'JP20' => __('Nagano', 'give'),
1263
+		'JP21' => __('Gifu', 'give'),
1264
+		'JP22' => __('Shizuoka', 'give'),
1265
+		'JP23' => __('Aichi', 'give'),
1266
+		'JP24' => __('Mie', 'give'),
1267
+		'JP25' => __('Shiga', 'give'),
1268
+		'JP26' => __('Kyoto', 'give'),
1269
+		'JP27' => __('Osaka', 'give'),
1270
+		'JP28' => __('Hyogo', 'give'),
1271
+		'JP29' => __('Nara', 'give'),
1272
+		'JP30' => __('Wakayama', 'give'),
1273
+		'JP31' => __('Tottori', 'give'),
1274
+		'JP32' => __('Shimane', 'give'),
1275
+		'JP33' => __('Okayama', 'give'),
1276
+		'JP34' => __('Hiroshima', 'give'),
1277
+		'JP35' => __('Yamaguchi', 'give'),
1278
+		'JP36' => __('Tokushima', 'give'),
1279
+		'JP37' => __('Kagawa', 'give'),
1280
+		'JP38' => __('Ehime', 'give'),
1281
+		'JP39' => __('Kochi', 'give'),
1282
+		'JP40' => __('Fukuoka', 'give'),
1283
+		'JP41' => __('Saga', 'give'),
1284
+		'JP42' => __('Nagasaki', 'give'),
1285
+		'JP43' => __('Kumamoto', 'give'),
1286
+		'JP44' => __('Oita', 'give'),
1287
+		'JP45' => __('Miyazaki', 'give'),
1288
+		'JP46' => __('Kagoshima', 'give'),
1289
+		'JP47' => __('Okinawa', 'give'),
1290 1290
 	);
1291 1291
 
1292
-	return apply_filters( 'give_japan_states', $states );
1292
+	return apply_filters('give_japan_states', $states);
1293 1293
 }
1294 1294
 
1295 1295
 /**
@@ -1301,119 +1301,119 @@  discard block
 block discarded – undo
1301 1301
 function give_get_italy_states_list() {
1302 1302
 	$states = array(
1303 1303
 		''   => '',
1304
-		'AG' => __( 'Agrigento', 'give' ),
1305
-		'AL' => __( 'Alessandria', 'give' ),
1306
-		'AN' => __( 'Ancona', 'give' ),
1307
-		'AO' => __( 'Aosta', 'give' ),
1308
-		'AR' => __( 'Arezzo', 'give' ),
1309
-		'AP' => __( 'Ascoli Piceno', 'give' ),
1310
-		'AT' => __( 'Asti', 'give' ),
1311
-		'AV' => __( 'Avellino', 'give' ),
1312
-		'BA' => __( 'Bari', 'give' ),
1313
-		'BT' => __( 'Barletta-Andria-Trani', 'give' ),
1314
-		'BL' => __( 'Belluno', 'give' ),
1315
-		'BN' => __( 'Benevento', 'give' ),
1316
-		'BG' => __( 'Bergamo', 'give' ),
1317
-		'BI' => __( 'Biella', 'give' ),
1318
-		'BO' => __( 'Bologna', 'give' ),
1319
-		'BZ' => __( 'Bolzano', 'give' ),
1320
-		'BS' => __( 'Brescia', 'give' ),
1321
-		'BR' => __( 'Brindisi', 'give' ),
1322
-		'CA' => __( 'Cagliari', 'give' ),
1323
-		'CL' => __( 'Caltanissetta', 'give' ),
1324
-		'CB' => __( 'Campobasso', 'give' ),
1325
-		'CI' => __( 'Carbonia-Iglesias', 'give' ),
1326
-		'CE' => __( 'Caserta', 'give' ),
1327
-		'CT' => __( 'Catania', 'give' ),
1328
-		'CZ' => __( 'Catanzaro', 'give' ),
1329
-		'CH' => __( 'Chieti', 'give' ),
1330
-		'CO' => __( 'Como', 'give' ),
1331
-		'CS' => __( 'Cosenza', 'give' ),
1332
-		'CR' => __( 'Cremona', 'give' ),
1333
-		'KR' => __( 'Crotone', 'give' ),
1334
-		'CN' => __( 'Cuneo', 'give' ),
1335
-		'EN' => __( 'Enna', 'give' ),
1336
-		'FM' => __( 'Fermo', 'give' ),
1337
-		'FE' => __( 'Ferrara', 'give' ),
1338
-		'FI' => __( 'Firenze', 'give' ),
1339
-		'FG' => __( 'Foggia', 'give' ),
1340
-		'FC' => __( 'Forlì-Cesena', 'give' ),
1341
-		'FR' => __( 'Frosinone', 'give' ),
1342
-		'GE' => __( 'Genova', 'give' ),
1343
-		'GO' => __( 'Gorizia', 'give' ),
1344
-		'GR' => __( 'Grosseto', 'give' ),
1345
-		'IM' => __( 'Imperia', 'give' ),
1346
-		'IS' => __( 'Isernia', 'give' ),
1347
-		'SP' => __( 'La Spezia', 'give' ),
1348
-		'AQ' => __( "L'Aquila", 'give' ),
1349
-		'LT' => __( 'Latina', 'give' ),
1350
-		'LE' => __( 'Lecce', 'give' ),
1351
-		'LC' => __( 'Lecco', 'give' ),
1352
-		'LI' => __( 'Livorno', 'give' ),
1353
-		'LO' => __( 'Lodi', 'give' ),
1354
-		'LU' => __( 'Lucca', 'give' ),
1355
-		'MC' => __( 'Macerata', 'give' ),
1356
-		'MN' => __( 'Mantova', 'give' ),
1357
-		'MS' => __( 'Massa-Carrara', 'give' ),
1358
-		'MT' => __( 'Matera', 'give' ),
1359
-		'ME' => __( 'Messina', 'give' ),
1360
-		'MI' => __( 'Milano', 'give' ),
1361
-		'MO' => __( 'Modena', 'give' ),
1362
-		'MB' => __( 'Monza e della Brianza', 'give' ),
1363
-		'NA' => __( 'Napoli', 'give' ),
1364
-		'NO' => __( 'Novara', 'give' ),
1365
-		'NU' => __( 'Nuoro', 'give' ),
1366
-		'OT' => __( 'Olbia-Tempio', 'give' ),
1367
-		'OR' => __( 'Oristano', 'give' ),
1368
-		'PD' => __( 'Padova', 'give' ),
1369
-		'PA' => __( 'Palermo', 'give' ),
1370
-		'PR' => __( 'Parma', 'give' ),
1371
-		'PV' => __( 'Pavia', 'give' ),
1372
-		'PG' => __( 'Perugia', 'give' ),
1373
-		'PU' => __( 'Pesaro e Urbino', 'give' ),
1374
-		'PE' => __( 'Pescara', 'give' ),
1375
-		'PC' => __( 'Piacenza', 'give' ),
1376
-		'PI' => __( 'Pisa', 'give' ),
1377
-		'PT' => __( 'Pistoia', 'give' ),
1378
-		'PN' => __( 'Pordenone', 'give' ),
1379
-		'PZ' => __( 'Potenza', 'give' ),
1380
-		'PO' => __( 'Prato', 'give' ),
1381
-		'RG' => __( 'Ragusa', 'give' ),
1382
-		'RA' => __( 'Ravenna', 'give' ),
1383
-		'RC' => __( 'Reggio Calabria', 'give' ),
1384
-		'RE' => __( 'Reggio Emilia', 'give' ),
1385
-		'RI' => __( 'Rieti', 'give' ),
1386
-		'RN' => __( 'Rimini', 'give' ),
1387
-		'RM' => __( 'Roma', 'give' ),
1388
-		'RO' => __( 'Rovigo', 'give' ),
1389
-		'SA' => __( 'Salerno', 'give' ),
1390
-		'VS' => __( 'Medio Campidano', 'give' ),
1391
-		'SS' => __( 'Sassari', 'give' ),
1392
-		'SV' => __( 'Savona', 'give' ),
1393
-		'SI' => __( 'Siena', 'give' ),
1394
-		'SR' => __( 'Siracusa', 'give' ),
1395
-		'SO' => __( 'Sondrio', 'give' ),
1396
-		'TA' => __( 'Taranto', 'give' ),
1397
-		'TE' => __( 'Teramo', 'give' ),
1398
-		'TR' => __( 'Terni', 'give' ),
1399
-		'TO' => __( 'Torino', 'give' ),
1400
-		'OG' => __( 'Ogliastra', 'give' ),
1401
-		'TP' => __( 'Trapani', 'give' ),
1402
-		'TN' => __( 'Trento', 'give' ),
1403
-		'TV' => __( 'Treviso', 'give' ),
1404
-		'TS' => __( 'Trieste', 'give' ),
1405
-		'UD' => __( 'Udine', 'give' ),
1406
-		'VA' => __( 'Varese', 'give' ),
1407
-		'VE' => __( 'Venezia', 'give' ),
1408
-		'VB' => __( 'Verbano-Cusio-Ossola', 'give' ),
1409
-		'VC' => __( 'Vercelli', 'give' ),
1410
-		'VR' => __( 'Verona', 'give' ),
1411
-		'VV' => __( 'Vibo Valentia', 'give' ),
1412
-		'VI' => __( 'Vicenza', 'give' ),
1413
-		'VT' => __( 'Viterbo', 'give' ),
1304
+		'AG' => __('Agrigento', 'give'),
1305
+		'AL' => __('Alessandria', 'give'),
1306
+		'AN' => __('Ancona', 'give'),
1307
+		'AO' => __('Aosta', 'give'),
1308
+		'AR' => __('Arezzo', 'give'),
1309
+		'AP' => __('Ascoli Piceno', 'give'),
1310
+		'AT' => __('Asti', 'give'),
1311
+		'AV' => __('Avellino', 'give'),
1312
+		'BA' => __('Bari', 'give'),
1313
+		'BT' => __('Barletta-Andria-Trani', 'give'),
1314
+		'BL' => __('Belluno', 'give'),
1315
+		'BN' => __('Benevento', 'give'),
1316
+		'BG' => __('Bergamo', 'give'),
1317
+		'BI' => __('Biella', 'give'),
1318
+		'BO' => __('Bologna', 'give'),
1319
+		'BZ' => __('Bolzano', 'give'),
1320
+		'BS' => __('Brescia', 'give'),
1321
+		'BR' => __('Brindisi', 'give'),
1322
+		'CA' => __('Cagliari', 'give'),
1323
+		'CL' => __('Caltanissetta', 'give'),
1324
+		'CB' => __('Campobasso', 'give'),
1325
+		'CI' => __('Carbonia-Iglesias', 'give'),
1326
+		'CE' => __('Caserta', 'give'),
1327
+		'CT' => __('Catania', 'give'),
1328
+		'CZ' => __('Catanzaro', 'give'),
1329
+		'CH' => __('Chieti', 'give'),
1330
+		'CO' => __('Como', 'give'),
1331
+		'CS' => __('Cosenza', 'give'),
1332
+		'CR' => __('Cremona', 'give'),
1333
+		'KR' => __('Crotone', 'give'),
1334
+		'CN' => __('Cuneo', 'give'),
1335
+		'EN' => __('Enna', 'give'),
1336
+		'FM' => __('Fermo', 'give'),
1337
+		'FE' => __('Ferrara', 'give'),
1338
+		'FI' => __('Firenze', 'give'),
1339
+		'FG' => __('Foggia', 'give'),
1340
+		'FC' => __('Forlì-Cesena', 'give'),
1341
+		'FR' => __('Frosinone', 'give'),
1342
+		'GE' => __('Genova', 'give'),
1343
+		'GO' => __('Gorizia', 'give'),
1344
+		'GR' => __('Grosseto', 'give'),
1345
+		'IM' => __('Imperia', 'give'),
1346
+		'IS' => __('Isernia', 'give'),
1347
+		'SP' => __('La Spezia', 'give'),
1348
+		'AQ' => __("L'Aquila", 'give'),
1349
+		'LT' => __('Latina', 'give'),
1350
+		'LE' => __('Lecce', 'give'),
1351
+		'LC' => __('Lecco', 'give'),
1352
+		'LI' => __('Livorno', 'give'),
1353
+		'LO' => __('Lodi', 'give'),
1354
+		'LU' => __('Lucca', 'give'),
1355
+		'MC' => __('Macerata', 'give'),
1356
+		'MN' => __('Mantova', 'give'),
1357
+		'MS' => __('Massa-Carrara', 'give'),
1358
+		'MT' => __('Matera', 'give'),
1359
+		'ME' => __('Messina', 'give'),
1360
+		'MI' => __('Milano', 'give'),
1361
+		'MO' => __('Modena', 'give'),
1362
+		'MB' => __('Monza e della Brianza', 'give'),
1363
+		'NA' => __('Napoli', 'give'),
1364
+		'NO' => __('Novara', 'give'),
1365
+		'NU' => __('Nuoro', 'give'),
1366
+		'OT' => __('Olbia-Tempio', 'give'),
1367
+		'OR' => __('Oristano', 'give'),
1368
+		'PD' => __('Padova', 'give'),
1369
+		'PA' => __('Palermo', 'give'),
1370
+		'PR' => __('Parma', 'give'),
1371
+		'PV' => __('Pavia', 'give'),
1372
+		'PG' => __('Perugia', 'give'),
1373
+		'PU' => __('Pesaro e Urbino', 'give'),
1374
+		'PE' => __('Pescara', 'give'),
1375
+		'PC' => __('Piacenza', 'give'),
1376
+		'PI' => __('Pisa', 'give'),
1377
+		'PT' => __('Pistoia', 'give'),
1378
+		'PN' => __('Pordenone', 'give'),
1379
+		'PZ' => __('Potenza', 'give'),
1380
+		'PO' => __('Prato', 'give'),
1381
+		'RG' => __('Ragusa', 'give'),
1382
+		'RA' => __('Ravenna', 'give'),
1383
+		'RC' => __('Reggio Calabria', 'give'),
1384
+		'RE' => __('Reggio Emilia', 'give'),
1385
+		'RI' => __('Rieti', 'give'),
1386
+		'RN' => __('Rimini', 'give'),
1387
+		'RM' => __('Roma', 'give'),
1388
+		'RO' => __('Rovigo', 'give'),
1389
+		'SA' => __('Salerno', 'give'),
1390
+		'VS' => __('Medio Campidano', 'give'),
1391
+		'SS' => __('Sassari', 'give'),
1392
+		'SV' => __('Savona', 'give'),
1393
+		'SI' => __('Siena', 'give'),
1394
+		'SR' => __('Siracusa', 'give'),
1395
+		'SO' => __('Sondrio', 'give'),
1396
+		'TA' => __('Taranto', 'give'),
1397
+		'TE' => __('Teramo', 'give'),
1398
+		'TR' => __('Terni', 'give'),
1399
+		'TO' => __('Torino', 'give'),
1400
+		'OG' => __('Ogliastra', 'give'),
1401
+		'TP' => __('Trapani', 'give'),
1402
+		'TN' => __('Trento', 'give'),
1403
+		'TV' => __('Treviso', 'give'),
1404
+		'TS' => __('Trieste', 'give'),
1405
+		'UD' => __('Udine', 'give'),
1406
+		'VA' => __('Varese', 'give'),
1407
+		'VE' => __('Venezia', 'give'),
1408
+		'VB' => __('Verbano-Cusio-Ossola', 'give'),
1409
+		'VC' => __('Vercelli', 'give'),
1410
+		'VR' => __('Verona', 'give'),
1411
+		'VV' => __('Vibo Valentia', 'give'),
1412
+		'VI' => __('Vicenza', 'give'),
1413
+		'VT' => __('Viterbo', 'give'),
1414 1414
 	);
1415 1415
 
1416
-	return apply_filters( 'give_italy_states', $states );
1416
+	return apply_filters('give_italy_states', $states);
1417 1417
 }
1418 1418
 
1419 1419
 /**
@@ -1425,40 +1425,40 @@  discard block
 block discarded – undo
1425 1425
 function give_get_iran_states_list() {
1426 1426
 	$states = array(
1427 1427
 		''    => '',
1428
-		'KHZ' => __( 'Khuzestan  (خوزستان)', 'give' ),
1429
-		'THR' => __( 'Tehran  (تهران)', 'give' ),
1430
-		'ILM' => __( 'Ilaam (ایلام)', 'give' ),
1431
-		'BHR' => __( 'Bushehr (بوشهر)', 'give' ),
1432
-		'ADL' => __( 'Ardabil (اردبیل)', 'give' ),
1433
-		'ESF' => __( 'Isfahan (اصفهان)', 'give' ),
1434
-		'YZD' => __( 'Yazd (یزد)', 'give' ),
1435
-		'KRH' => __( 'Kermanshah (کرمانشاه)', 'give' ),
1436
-		'KRN' => __( 'Kerman (کرمان)', 'give' ),
1437
-		'HDN' => __( 'Hamadan (همدان)', 'give' ),
1438
-		'GZN' => __( 'Ghazvin (قزوین)', 'give' ),
1439
-		'ZJN' => __( 'Zanjan (زنجان)', 'give' ),
1440
-		'LRS' => __( 'Luristan (لرستان)', 'give' ),
1441
-		'ABZ' => __( 'Alborz (البرز)', 'give' ),
1442
-		'EAZ' => __( 'East Azarbaijan (آذربایجان شرقی)', 'give' ),
1443
-		'WAZ' => __( 'West Azarbaijan (آذربایجان غربی)', 'give' ),
1444
-		'CHB' => __( 'Chaharmahal and Bakhtiari (چهارمحال و بختیاری)', 'give' ),
1445
-		'SKH' => __( 'South Khorasan (خراسان جنوبی)', 'give' ),
1446
-		'RKH' => __( 'Razavi Khorasan (خراسان رضوی)', 'give' ),
1447
-		'NKH' => __( 'North Khorasan (خراسان جنوبی)', 'give' ),
1448
-		'SMN' => __( 'Semnan (سمنان)', 'give' ),
1449
-		'FRS' => __( 'Fars (فارس)', 'give' ),
1450
-		'QHM' => __( 'Qom (قم)', 'give' ),
1451
-		'KRD' => __( 'Kurdistan / کردستان)', 'give' ),
1452
-		'KBD' => __( 'Kohgiluyeh and BoyerAhmad (کهگیلوییه و بویراحمد)', 'give' ),
1453
-		'GLS' => __( 'Golestan (گلستان)', 'give' ),
1454
-		'GIL' => __( 'Gilan (گیلان)', 'give' ),
1455
-		'MZN' => __( 'Mazandaran (مازندران)', 'give' ),
1456
-		'MKZ' => __( 'Markazi (مرکزی)', 'give' ),
1457
-		'HRZ' => __( 'Hormozgan (هرمزگان)', 'give' ),
1458
-		'SBN' => __( 'Sistan and Baluchestan (سیستان و بلوچستان)', 'give' ),
1428
+		'KHZ' => __('Khuzestan  (خوزستان)', 'give'),
1429
+		'THR' => __('Tehran  (تهران)', 'give'),
1430
+		'ILM' => __('Ilaam (ایلام)', 'give'),
1431
+		'BHR' => __('Bushehr (بوشهر)', 'give'),
1432
+		'ADL' => __('Ardabil (اردبیل)', 'give'),
1433
+		'ESF' => __('Isfahan (اصفهان)', 'give'),
1434
+		'YZD' => __('Yazd (یزد)', 'give'),
1435
+		'KRH' => __('Kermanshah (کرمانشاه)', 'give'),
1436
+		'KRN' => __('Kerman (کرمان)', 'give'),
1437
+		'HDN' => __('Hamadan (همدان)', 'give'),
1438
+		'GZN' => __('Ghazvin (قزوین)', 'give'),
1439
+		'ZJN' => __('Zanjan (زنجان)', 'give'),
1440
+		'LRS' => __('Luristan (لرستان)', 'give'),
1441
+		'ABZ' => __('Alborz (البرز)', 'give'),
1442
+		'EAZ' => __('East Azarbaijan (آذربایجان شرقی)', 'give'),
1443
+		'WAZ' => __('West Azarbaijan (آذربایجان غربی)', 'give'),
1444
+		'CHB' => __('Chaharmahal and Bakhtiari (چهارمحال و بختیاری)', 'give'),
1445
+		'SKH' => __('South Khorasan (خراسان جنوبی)', 'give'),
1446
+		'RKH' => __('Razavi Khorasan (خراسان رضوی)', 'give'),
1447
+		'NKH' => __('North Khorasan (خراسان جنوبی)', 'give'),
1448
+		'SMN' => __('Semnan (سمنان)', 'give'),
1449
+		'FRS' => __('Fars (فارس)', 'give'),
1450
+		'QHM' => __('Qom (قم)', 'give'),
1451
+		'KRD' => __('Kurdistan / کردستان)', 'give'),
1452
+		'KBD' => __('Kohgiluyeh and BoyerAhmad (کهگیلوییه و بویراحمد)', 'give'),
1453
+		'GLS' => __('Golestan (گلستان)', 'give'),
1454
+		'GIL' => __('Gilan (گیلان)', 'give'),
1455
+		'MZN' => __('Mazandaran (مازندران)', 'give'),
1456
+		'MKZ' => __('Markazi (مرکزی)', 'give'),
1457
+		'HRZ' => __('Hormozgan (هرمزگان)', 'give'),
1458
+		'SBN' => __('Sistan and Baluchestan (سیستان و بلوچستان)', 'give'),
1459 1459
 	);
1460 1460
 
1461
-	return apply_filters( 'give_iran_states', $states );
1461
+	return apply_filters('give_iran_states', $states);
1462 1462
 }
1463 1463
 
1464 1464
 /**
@@ -1470,35 +1470,35 @@  discard block
 block discarded – undo
1470 1470
 function give_get_ireland_states_list() {
1471 1471
 	$states = array(
1472 1472
 		''   => '',
1473
-		'CE' => __( 'Clare', 'give' ),
1474
-		'CK' => __( 'Cork', 'give' ),
1475
-		'CN' => __( 'Cavan', 'give' ),
1476
-		'CW' => __( 'Carlow', 'give' ),
1477
-		'DL' => __( 'Donegal', 'give' ),
1478
-		'DN' => __( 'Dublin', 'give' ),
1479
-		'GY' => __( 'Galway', 'give' ),
1480
-		'KE' => __( 'Kildare', 'give' ),
1481
-		'KK' => __( 'Kilkenny', 'give' ),
1482
-		'KY' => __( 'Kerry', 'give' ),
1483
-		'LD' => __( 'Longford', 'give' ),
1484
-		'LH' => __( 'Louth', 'give' ),
1485
-		'LK' => __( 'Limerick', 'give' ),
1486
-		'LM' => __( 'Leitrim', 'give' ),
1487
-		'LS' => __( 'Laois', 'give' ),
1488
-		'MH' => __( 'Meath', 'give' ),
1489
-		'MN' => __( 'Monaghan', 'give' ),
1490
-		'MO' => __( 'Mayo', 'give' ),
1491
-		'OY' => __( 'Offaly', 'give' ),
1492
-		'RN' => __( 'Roscommon', 'give' ),
1493
-		'SO' => __( 'Sligo', 'give' ),
1494
-		'TY' => __( 'Tipperary', 'give' ),
1495
-		'WD' => __( 'Waterford', 'give' ),
1496
-		'WH' => __( 'Westmeath', 'give' ),
1497
-		'WW' => __( 'Wicklow', 'give' ),
1498
-		'WX' => __( 'Wexford', 'give' ),
1473
+		'CE' => __('Clare', 'give'),
1474
+		'CK' => __('Cork', 'give'),
1475
+		'CN' => __('Cavan', 'give'),
1476
+		'CW' => __('Carlow', 'give'),
1477
+		'DL' => __('Donegal', 'give'),
1478
+		'DN' => __('Dublin', 'give'),
1479
+		'GY' => __('Galway', 'give'),
1480
+		'KE' => __('Kildare', 'give'),
1481
+		'KK' => __('Kilkenny', 'give'),
1482
+		'KY' => __('Kerry', 'give'),
1483
+		'LD' => __('Longford', 'give'),
1484
+		'LH' => __('Louth', 'give'),
1485
+		'LK' => __('Limerick', 'give'),
1486
+		'LM' => __('Leitrim', 'give'),
1487
+		'LS' => __('Laois', 'give'),
1488
+		'MH' => __('Meath', 'give'),
1489
+		'MN' => __('Monaghan', 'give'),
1490
+		'MO' => __('Mayo', 'give'),
1491
+		'OY' => __('Offaly', 'give'),
1492
+		'RN' => __('Roscommon', 'give'),
1493
+		'SO' => __('Sligo', 'give'),
1494
+		'TY' => __('Tipperary', 'give'),
1495
+		'WD' => __('Waterford', 'give'),
1496
+		'WH' => __('Westmeath', 'give'),
1497
+		'WW' => __('Wicklow', 'give'),
1498
+		'WX' => __('Wexford', 'give'),
1499 1499
 	);
1500 1500
 
1501
-	return apply_filters( 'give_ireland_states', $states );
1501
+	return apply_filters('give_ireland_states', $states);
1502 1502
 }
1503 1503
 
1504 1504
 /**
@@ -1510,22 +1510,22 @@  discard block
 block discarded – undo
1510 1510
 function give_get_greek_states_list() {
1511 1511
 	$states = array(
1512 1512
 		''  => '',
1513
-		'I' => __( 'Αττική', 'give' ),
1514
-		'A' => __( 'Ανατολική Μακεδονία και Θράκη', 'give' ),
1515
-		'B' => __( 'Κεντρική Μακεδονία', 'give' ),
1516
-		'C' => __( 'Δυτική Μακεδονία', 'give' ),
1517
-		'D' => __( 'Ήπειρος', 'give' ),
1518
-		'E' => __( 'Θεσσαλία', 'give' ),
1519
-		'F' => __( 'Ιόνιοι Νήσοι', 'give' ),
1520
-		'G' => __( 'Δυτική Ελλάδα', 'give' ),
1521
-		'H' => __( 'Στερεά Ελλάδα', 'give' ),
1522
-		'J' => __( 'Πελοπόννησος', 'give' ),
1523
-		'K' => __( 'Βόρειο Αιγαίο', 'give' ),
1524
-		'L' => __( 'Νότιο Αιγαίο', 'give' ),
1525
-		'M' => __( 'Κρήτη', 'give' ),
1513
+		'I' => __('Αττική', 'give'),
1514
+		'A' => __('Ανατολική Μακεδονία και Θράκη', 'give'),
1515
+		'B' => __('Κεντρική Μακεδονία', 'give'),
1516
+		'C' => __('Δυτική Μακεδονία', 'give'),
1517
+		'D' => __('Ήπειρος', 'give'),
1518
+		'E' => __('Θεσσαλία', 'give'),
1519
+		'F' => __('Ιόνιοι Νήσοι', 'give'),
1520
+		'G' => __('Δυτική Ελλάδα', 'give'),
1521
+		'H' => __('Στερεά Ελλάδα', 'give'),
1522
+		'J' => __('Πελοπόννησος', 'give'),
1523
+		'K' => __('Βόρειο Αιγαίο', 'give'),
1524
+		'L' => __('Νότιο Αιγαίο', 'give'),
1525
+		'M' => __('Κρήτη', 'give'),
1526 1526
 	);
1527 1527
 
1528
-	return apply_filters( 'give_greek_states', $states );
1528
+	return apply_filters('give_greek_states', $states);
1529 1529
 }
1530 1530
 
1531 1531
 /**
@@ -1537,18 +1537,18 @@  discard block
 block discarded – undo
1537 1537
 function give_get_bolivian_states_list() {
1538 1538
 	$states = array(
1539 1539
 		''  => '',
1540
-		'B' => __( 'Chuquisaca', 'give' ),
1541
-		'H' => __( 'Beni', 'give' ),
1542
-		'C' => __( 'Cochabamba', 'give' ),
1543
-		'L' => __( 'La Paz', 'give' ),
1544
-		'O' => __( 'Oruro', 'give' ),
1545
-		'N' => __( 'Pando', 'give' ),
1546
-		'P' => __( 'Potosí', 'give' ),
1547
-		'S' => __( 'Santa Cruz', 'give' ),
1548
-		'T' => __( 'Tarija', 'give' ),
1540
+		'B' => __('Chuquisaca', 'give'),
1541
+		'H' => __('Beni', 'give'),
1542
+		'C' => __('Cochabamba', 'give'),
1543
+		'L' => __('La Paz', 'give'),
1544
+		'O' => __('Oruro', 'give'),
1545
+		'N' => __('Pando', 'give'),
1546
+		'P' => __('Potosí', 'give'),
1547
+		'S' => __('Santa Cruz', 'give'),
1548
+		'T' => __('Tarija', 'give'),
1549 1549
 	);
1550 1550
 
1551
-	return apply_filters( 'give_bolivian_states', $states );
1551
+	return apply_filters('give_bolivian_states', $states);
1552 1552
 }
1553 1553
 
1554 1554
 /**
@@ -1560,37 +1560,37 @@  discard block
 block discarded – undo
1560 1560
 function give_get_bulgarian_states_list() {
1561 1561
 	$states = array(
1562 1562
 		''      => '',
1563
-		'BG-01' => __( 'Blagoevgrad', 'give' ),
1564
-		'BG-02' => __( 'Burgas', 'give' ),
1565
-		'BG-08' => __( 'Dobrich', 'give' ),
1566
-		'BG-07' => __( 'Gabrovo', 'give' ),
1567
-		'BG-26' => __( 'Haskovo', 'give' ),
1568
-		'BG-09' => __( 'Kardzhali', 'give' ),
1569
-		'BG-10' => __( 'Kyustendil', 'give' ),
1570
-		'BG-11' => __( 'Lovech', 'give' ),
1571
-		'BG-12' => __( 'Montana', 'give' ),
1572
-		'BG-13' => __( 'Pazardzhik', 'give' ),
1573
-		'BG-14' => __( 'Pernik', 'give' ),
1574
-		'BG-15' => __( 'Pleven', 'give' ),
1575
-		'BG-16' => __( 'Plovdiv', 'give' ),
1576
-		'BG-17' => __( 'Razgrad', 'give' ),
1577
-		'BG-18' => __( 'Ruse', 'give' ),
1578
-		'BG-27' => __( 'Shumen', 'give' ),
1579
-		'BG-19' => __( 'Silistra', 'give' ),
1580
-		'BG-20' => __( 'Sliven', 'give' ),
1581
-		'BG-21' => __( 'Smolyan', 'give' ),
1582
-		'BG-23' => __( 'Sofia', 'give' ),
1583
-		'BG-22' => __( 'Sofia-Grad', 'give' ),
1584
-		'BG-24' => __( 'Stara Zagora', 'give' ),
1585
-		'BG-25' => __( 'Targovishte', 'give' ),
1586
-		'BG-03' => __( 'Varna', 'give' ),
1587
-		'BG-04' => __( 'Veliko Tarnovo', 'give' ),
1588
-		'BG-05' => __( 'Vidin', 'give' ),
1589
-		'BG-06' => __( 'Vratsa', 'give' ),
1590
-		'BG-28' => __( 'Yambol', 'give' ),
1563
+		'BG-01' => __('Blagoevgrad', 'give'),
1564
+		'BG-02' => __('Burgas', 'give'),
1565
+		'BG-08' => __('Dobrich', 'give'),
1566
+		'BG-07' => __('Gabrovo', 'give'),
1567
+		'BG-26' => __('Haskovo', 'give'),
1568
+		'BG-09' => __('Kardzhali', 'give'),
1569
+		'BG-10' => __('Kyustendil', 'give'),
1570
+		'BG-11' => __('Lovech', 'give'),
1571
+		'BG-12' => __('Montana', 'give'),
1572
+		'BG-13' => __('Pazardzhik', 'give'),
1573
+		'BG-14' => __('Pernik', 'give'),
1574
+		'BG-15' => __('Pleven', 'give'),
1575
+		'BG-16' => __('Plovdiv', 'give'),
1576
+		'BG-17' => __('Razgrad', 'give'),
1577
+		'BG-18' => __('Ruse', 'give'),
1578
+		'BG-27' => __('Shumen', 'give'),
1579
+		'BG-19' => __('Silistra', 'give'),
1580
+		'BG-20' => __('Sliven', 'give'),
1581
+		'BG-21' => __('Smolyan', 'give'),
1582
+		'BG-23' => __('Sofia', 'give'),
1583
+		'BG-22' => __('Sofia-Grad', 'give'),
1584
+		'BG-24' => __('Stara Zagora', 'give'),
1585
+		'BG-25' => __('Targovishte', 'give'),
1586
+		'BG-03' => __('Varna', 'give'),
1587
+		'BG-04' => __('Veliko Tarnovo', 'give'),
1588
+		'BG-05' => __('Vidin', 'give'),
1589
+		'BG-06' => __('Vratsa', 'give'),
1590
+		'BG-28' => __('Yambol', 'give'),
1591 1591
 	);
1592 1592
 
1593
-	return apply_filters( 'give_bulgarian_states', $states );
1593
+	return apply_filters('give_bulgarian_states', $states);
1594 1594
 }
1595 1595
 
1596 1596
 /**
@@ -1602,73 +1602,73 @@  discard block
 block discarded – undo
1602 1602
 function give_get_bangladeshi_states_list() {
1603 1603
 	$states = array(
1604 1604
 		''     => '',
1605
-		'BAG'  => __( 'Bagerhat', 'give' ),
1606
-		'BAN'  => __( 'Bandarban', 'give' ),
1607
-		'BAR'  => __( 'Barguna', 'give' ),
1608
-		'BARI' => __( 'Barisal', 'give' ),
1609
-		'BHO'  => __( 'Bhola', 'give' ),
1610
-		'BOG'  => __( 'Bogra', 'give' ),
1611
-		'BRA'  => __( 'Brahmanbaria', 'give' ),
1612
-		'CHA'  => __( 'Chandpur', 'give' ),
1613
-		'CHI'  => __( 'Chittagong', 'give' ),
1614
-		'CHU'  => __( 'Chuadanga', 'give' ),
1615
-		'COM'  => __( 'Comilla', 'give' ),
1616
-		'COX'  => __( "Cox's Bazar", 'give' ),
1617
-		'DHA'  => __( 'Dhaka', 'give' ),
1618
-		'DIN'  => __( 'Dinajpur', 'give' ),
1619
-		'FAR'  => __( 'Faridpur ', 'give' ),
1620
-		'FEN'  => __( 'Feni', 'give' ),
1621
-		'GAI'  => __( 'Gaibandha', 'give' ),
1622
-		'GAZI' => __( 'Gazipur', 'give' ),
1623
-		'GOP'  => __( 'Gopalganj', 'give' ),
1624
-		'HAB'  => __( 'Habiganj', 'give' ),
1625
-		'JAM'  => __( 'Jamalpur', 'give' ),
1626
-		'JES'  => __( 'Jessore', 'give' ),
1627
-		'JHA'  => __( 'Jhalokati', 'give' ),
1628
-		'JHE'  => __( 'Jhenaidah', 'give' ),
1629
-		'JOY'  => __( 'Joypurhat', 'give' ),
1630
-		'KHA'  => __( 'Khagrachhari', 'give' ),
1631
-		'KHU'  => __( 'Khulna', 'give' ),
1632
-		'KIS'  => __( 'Kishoreganj', 'give' ),
1633
-		'KUR'  => __( 'Kurigram', 'give' ),
1634
-		'KUS'  => __( 'Kushtia', 'give' ),
1635
-		'LAK'  => __( 'Lakshmipur', 'give' ),
1636
-		'LAL'  => __( 'Lalmonirhat', 'give' ),
1637
-		'MAD'  => __( 'Madaripur', 'give' ),
1638
-		'MAG'  => __( 'Magura', 'give' ),
1639
-		'MAN'  => __( 'Manikganj ', 'give' ),
1640
-		'MEH'  => __( 'Meherpur', 'give' ),
1641
-		'MOU'  => __( 'Moulvibazar', 'give' ),
1642
-		'MUN'  => __( 'Munshiganj', 'give' ),
1643
-		'MYM'  => __( 'Mymensingh', 'give' ),
1644
-		'NAO'  => __( 'Naogaon', 'give' ),
1645
-		'NAR'  => __( 'Narail', 'give' ),
1646
-		'NARG' => __( 'Narayanganj', 'give' ),
1647
-		'NARD' => __( 'Narsingdi', 'give' ),
1648
-		'NAT'  => __( 'Natore', 'give' ),
1649
-		'NAW'  => __( 'Nawabganj', 'give' ),
1650
-		'NET'  => __( 'Netrakona', 'give' ),
1651
-		'NIL'  => __( 'Nilphamari', 'give' ),
1652
-		'NOA'  => __( 'Noakhali', 'give' ),
1653
-		'PAB'  => __( 'Pabna', 'give' ),
1654
-		'PAN'  => __( 'Panchagarh', 'give' ),
1655
-		'PAT'  => __( 'Patuakhali', 'give' ),
1656
-		'PIR'  => __( 'Pirojpur', 'give' ),
1657
-		'RAJB' => __( 'Rajbari', 'give' ),
1658
-		'RAJ'  => __( 'Rajshahi', 'give' ),
1659
-		'RAN'  => __( 'Rangamati', 'give' ),
1660
-		'RANP' => __( 'Rangpur', 'give' ),
1661
-		'SAT'  => __( 'Satkhira', 'give' ),
1662
-		'SHA'  => __( 'Shariatpur', 'give' ),
1663
-		'SHE'  => __( 'Sherpur', 'give' ),
1664
-		'SIR'  => __( 'Sirajganj', 'give' ),
1665
-		'SUN'  => __( 'Sunamganj', 'give' ),
1666
-		'SYL'  => __( 'Sylhet', 'give' ),
1667
-		'TAN'  => __( 'Tangail', 'give' ),
1668
-		'THA'  => __( 'Thakurgaon', 'give' ),
1605
+		'BAG'  => __('Bagerhat', 'give'),
1606
+		'BAN'  => __('Bandarban', 'give'),
1607
+		'BAR'  => __('Barguna', 'give'),
1608
+		'BARI' => __('Barisal', 'give'),
1609
+		'BHO'  => __('Bhola', 'give'),
1610
+		'BOG'  => __('Bogra', 'give'),
1611
+		'BRA'  => __('Brahmanbaria', 'give'),
1612
+		'CHA'  => __('Chandpur', 'give'),
1613
+		'CHI'  => __('Chittagong', 'give'),
1614
+		'CHU'  => __('Chuadanga', 'give'),
1615
+		'COM'  => __('Comilla', 'give'),
1616
+		'COX'  => __("Cox's Bazar", 'give'),
1617
+		'DHA'  => __('Dhaka', 'give'),
1618
+		'DIN'  => __('Dinajpur', 'give'),
1619
+		'FAR'  => __('Faridpur ', 'give'),
1620
+		'FEN'  => __('Feni', 'give'),
1621
+		'GAI'  => __('Gaibandha', 'give'),
1622
+		'GAZI' => __('Gazipur', 'give'),
1623
+		'GOP'  => __('Gopalganj', 'give'),
1624
+		'HAB'  => __('Habiganj', 'give'),
1625
+		'JAM'  => __('Jamalpur', 'give'),
1626
+		'JES'  => __('Jessore', 'give'),
1627
+		'JHA'  => __('Jhalokati', 'give'),
1628
+		'JHE'  => __('Jhenaidah', 'give'),
1629
+		'JOY'  => __('Joypurhat', 'give'),
1630
+		'KHA'  => __('Khagrachhari', 'give'),
1631
+		'KHU'  => __('Khulna', 'give'),
1632
+		'KIS'  => __('Kishoreganj', 'give'),
1633
+		'KUR'  => __('Kurigram', 'give'),
1634
+		'KUS'  => __('Kushtia', 'give'),
1635
+		'LAK'  => __('Lakshmipur', 'give'),
1636
+		'LAL'  => __('Lalmonirhat', 'give'),
1637
+		'MAD'  => __('Madaripur', 'give'),
1638
+		'MAG'  => __('Magura', 'give'),
1639
+		'MAN'  => __('Manikganj ', 'give'),
1640
+		'MEH'  => __('Meherpur', 'give'),
1641
+		'MOU'  => __('Moulvibazar', 'give'),
1642
+		'MUN'  => __('Munshiganj', 'give'),
1643
+		'MYM'  => __('Mymensingh', 'give'),
1644
+		'NAO'  => __('Naogaon', 'give'),
1645
+		'NAR'  => __('Narail', 'give'),
1646
+		'NARG' => __('Narayanganj', 'give'),
1647
+		'NARD' => __('Narsingdi', 'give'),
1648
+		'NAT'  => __('Natore', 'give'),
1649
+		'NAW'  => __('Nawabganj', 'give'),
1650
+		'NET'  => __('Netrakona', 'give'),
1651
+		'NIL'  => __('Nilphamari', 'give'),
1652
+		'NOA'  => __('Noakhali', 'give'),
1653
+		'PAB'  => __('Pabna', 'give'),
1654
+		'PAN'  => __('Panchagarh', 'give'),
1655
+		'PAT'  => __('Patuakhali', 'give'),
1656
+		'PIR'  => __('Pirojpur', 'give'),
1657
+		'RAJB' => __('Rajbari', 'give'),
1658
+		'RAJ'  => __('Rajshahi', 'give'),
1659
+		'RAN'  => __('Rangamati', 'give'),
1660
+		'RANP' => __('Rangpur', 'give'),
1661
+		'SAT'  => __('Satkhira', 'give'),
1662
+		'SHA'  => __('Shariatpur', 'give'),
1663
+		'SHE'  => __('Sherpur', 'give'),
1664
+		'SIR'  => __('Sirajganj', 'give'),
1665
+		'SUN'  => __('Sunamganj', 'give'),
1666
+		'SYL'  => __('Sylhet', 'give'),
1667
+		'TAN'  => __('Tangail', 'give'),
1668
+		'THA'  => __('Thakurgaon', 'give'),
1669 1669
 	);
1670 1670
 
1671
-	return apply_filters( 'give_bangladeshi_states', $states );
1671
+	return apply_filters('give_bangladeshi_states', $states);
1672 1672
 }
1673 1673
 
1674 1674
 /**
@@ -1680,33 +1680,33 @@  discard block
 block discarded – undo
1680 1680
 function give_get_argentina_states_list() {
1681 1681
 	$states = array(
1682 1682
 		''  => '',
1683
-		'C' => __( 'Ciudad Autónoma de Buenos Aires', 'give' ),
1684
-		'B' => __( 'Buenos Aires', 'give' ),
1685
-		'K' => __( 'Catamarca', 'give' ),
1686
-		'H' => __( 'Chaco', 'give' ),
1687
-		'U' => __( 'Chubut', 'give' ),
1688
-		'X' => __( 'Córdoba', 'give' ),
1689
-		'W' => __( 'Corrientes', 'give' ),
1690
-		'E' => __( 'Entre Ríos', 'give' ),
1691
-		'P' => __( 'Formosa', 'give' ),
1692
-		'Y' => __( 'Jujuy', 'give' ),
1693
-		'L' => __( 'La Pampa', 'give' ),
1694
-		'F' => __( 'La Rioja', 'give' ),
1695
-		'M' => __( 'Mendoza', 'give' ),
1696
-		'N' => __( 'Misiones', 'give' ),
1697
-		'Q' => __( 'Neuquén', 'give' ),
1698
-		'R' => __( 'Río Negro', 'give' ),
1699
-		'A' => __( 'Salta', 'give' ),
1700
-		'J' => __( 'San Juan', 'give' ),
1701
-		'D' => __( 'San Luis', 'give' ),
1702
-		'Z' => __( 'Santa Cruz', 'give' ),
1703
-		'S' => __( 'Santa Fe', 'give' ),
1704
-		'G' => __( 'Santiago del Estero', 'give' ),
1705
-		'V' => __( 'Tierra del Fuego', 'give' ),
1706
-		'T' => __( 'Tucumán', 'give' ),
1683
+		'C' => __('Ciudad Autónoma de Buenos Aires', 'give'),
1684
+		'B' => __('Buenos Aires', 'give'),
1685
+		'K' => __('Catamarca', 'give'),
1686
+		'H' => __('Chaco', 'give'),
1687
+		'U' => __('Chubut', 'give'),
1688
+		'X' => __('Córdoba', 'give'),
1689
+		'W' => __('Corrientes', 'give'),
1690
+		'E' => __('Entre Ríos', 'give'),
1691
+		'P' => __('Formosa', 'give'),
1692
+		'Y' => __('Jujuy', 'give'),
1693
+		'L' => __('La Pampa', 'give'),
1694
+		'F' => __('La Rioja', 'give'),
1695
+		'M' => __('Mendoza', 'give'),
1696
+		'N' => __('Misiones', 'give'),
1697
+		'Q' => __('Neuquén', 'give'),
1698
+		'R' => __('Río Negro', 'give'),
1699
+		'A' => __('Salta', 'give'),
1700
+		'J' => __('San Juan', 'give'),
1701
+		'D' => __('San Luis', 'give'),
1702
+		'Z' => __('Santa Cruz', 'give'),
1703
+		'S' => __('Santa Fe', 'give'),
1704
+		'G' => __('Santiago del Estero', 'give'),
1705
+		'V' => __('Tierra del Fuego', 'give'),
1706
+		'T' => __('Tucumán', 'give'),
1707 1707
 	);
1708 1708
 
1709
-	return apply_filters( 'give_argentina_states', $states );
1709
+	return apply_filters('give_argentina_states', $states);
1710 1710
 }
1711 1711
 
1712 1712
 /**
@@ -1787,7 +1787,7 @@  discard block
 block discarded – undo
1787 1787
 		'AP' => 'Armed Forces - Pacific',
1788 1788
 	);
1789 1789
 
1790
-	return apply_filters( 'give_us_states', $states );
1790
+	return apply_filters('give_us_states', $states);
1791 1791
 }
1792 1792
 
1793 1793
 /**
@@ -1800,22 +1800,22 @@  discard block
 block discarded – undo
1800 1800
 function give_get_provinces_list() {
1801 1801
 	$provinces = array(
1802 1802
 		''   => '',
1803
-		'AB' => esc_html__( 'Alberta', 'give' ),
1804
-		'BC' => esc_html__( 'British Columbia', 'give' ),
1805
-		'MB' => esc_html__( 'Manitoba', 'give' ),
1806
-		'NB' => esc_html__( 'New Brunswick', 'give' ),
1807
-		'NL' => esc_html__( 'Newfoundland and Labrador', 'give' ),
1808
-		'NS' => esc_html__( 'Nova Scotia', 'give' ),
1809
-		'NT' => esc_html__( 'Northwest Territories', 'give' ),
1810
-		'NU' => esc_html__( 'Nunavut', 'give' ),
1811
-		'ON' => esc_html__( 'Ontario', 'give' ),
1812
-		'PE' => esc_html__( 'Prince Edward Island', 'give' ),
1813
-		'QC' => esc_html__( 'Quebec', 'give' ),
1814
-		'SK' => esc_html__( 'Saskatchewan', 'give' ),
1815
-		'YT' => esc_html__( 'Yukon', 'give' ),
1803
+		'AB' => esc_html__('Alberta', 'give'),
1804
+		'BC' => esc_html__('British Columbia', 'give'),
1805
+		'MB' => esc_html__('Manitoba', 'give'),
1806
+		'NB' => esc_html__('New Brunswick', 'give'),
1807
+		'NL' => esc_html__('Newfoundland and Labrador', 'give'),
1808
+		'NS' => esc_html__('Nova Scotia', 'give'),
1809
+		'NT' => esc_html__('Northwest Territories', 'give'),
1810
+		'NU' => esc_html__('Nunavut', 'give'),
1811
+		'ON' => esc_html__('Ontario', 'give'),
1812
+		'PE' => esc_html__('Prince Edward Island', 'give'),
1813
+		'QC' => esc_html__('Quebec', 'give'),
1814
+		'SK' => esc_html__('Saskatchewan', 'give'),
1815
+		'YT' => esc_html__('Yukon', 'give'),
1816 1816
 	);
1817 1817
 
1818
-	return apply_filters( 'give_canada_provinces', $provinces );
1818
+	return apply_filters('give_canada_provinces', $provinces);
1819 1819
 }
1820 1820
 
1821 1821
 /**
@@ -1837,7 +1837,7 @@  discard block
 block discarded – undo
1837 1837
 		'WA'  => 'Western Australia',
1838 1838
 	);
1839 1839
 
1840
-	return apply_filters( 'give_australian_states', $states );
1840
+	return apply_filters('give_australian_states', $states);
1841 1841
 }
1842 1842
 
1843 1843
 /**
@@ -1878,7 +1878,7 @@  discard block
 block discarded – undo
1878 1878
 		'TO' => 'Tocantins',
1879 1879
 	);
1880 1880
 
1881
-	return apply_filters( 'give_brazil_states', $states );
1881
+	return apply_filters('give_brazil_states', $states);
1882 1882
 }
1883 1883
 
1884 1884
 /**
@@ -1895,7 +1895,7 @@  discard block
 block discarded – undo
1895 1895
 		'NEW TERRITORIES' => 'New Territories',
1896 1896
 	);
1897 1897
 
1898
-	return apply_filters( 'give_hong_kong_states', $states );
1898
+	return apply_filters('give_hong_kong_states', $states);
1899 1899
 }
1900 1900
 
1901 1901
 /**
@@ -1929,7 +1929,7 @@  discard block
 block discarded – undo
1929 1929
 		'ZA' => 'Zala',
1930 1930
 	);
1931 1931
 
1932
-	return apply_filters( 'give_hungary_states', $states );
1932
+	return apply_filters('give_hungary_states', $states);
1933 1933
 }
1934 1934
 
1935 1935
 /**
@@ -1975,7 +1975,7 @@  discard block
 block discarded – undo
1975 1975
 		'CN32' => 'Xinjiang / 新疆',
1976 1976
 	);
1977 1977
 
1978
-	return apply_filters( 'give_chinese_states', $states );
1978
+	return apply_filters('give_chinese_states', $states);
1979 1979
 }
1980 1980
 
1981 1981
 /**
@@ -2004,7 +2004,7 @@  discard block
 block discarded – undo
2004 2004
 		'WC' => 'West Coast',
2005 2005
 	);
2006 2006
 
2007
-	return apply_filters( 'give_new_zealand_states', $states );
2007
+	return apply_filters('give_new_zealand_states', $states);
2008 2008
 }
2009 2009
 
2010 2010
 /**
@@ -2052,7 +2052,7 @@  discard block
 block discarded – undo
2052 2052
 		'PB' => 'Papua Barat',
2053 2053
 	);
2054 2054
 
2055
-	return apply_filters( 'give_indonesia_states', $states );
2055
+	return apply_filters('give_indonesia_states', $states);
2056 2056
 }
2057 2057
 
2058 2058
 /**
@@ -2102,7 +2102,7 @@  discard block
 block discarded – undo
2102 2102
 		'PY' => 'Pondicherry (Puducherry)',
2103 2103
 	);
2104 2104
 
2105
-	return apply_filters( 'give_indian_states', $states );
2105
+	return apply_filters('give_indian_states', $states);
2106 2106
 }
2107 2107
 
2108 2108
 /**
@@ -2132,7 +2132,7 @@  discard block
 block discarded – undo
2132 2132
 		'PJY' => 'W.P. Putrajaya',
2133 2133
 	);
2134 2134
 
2135
-	return apply_filters( 'give_malaysian_states', $states );
2135
+	return apply_filters('give_malaysian_states', $states);
2136 2136
 }
2137 2137
 
2138 2138
 /**
@@ -2155,7 +2155,7 @@  discard block
 block discarded – undo
2155 2155
 		'WC'  => 'Western Cape',
2156 2156
 	);
2157 2157
 
2158
-	return apply_filters( 'give_south_african_states', $states );
2158
+	return apply_filters('give_south_african_states', $states);
2159 2159
 }
2160 2160
 
2161 2161
 /**
@@ -2246,7 +2246,7 @@  discard block
 block discarded – undo
2246 2246
 		'TH-35' => 'Yasothon (ยโสธร)',
2247 2247
 	);
2248 2248
 
2249
-	return apply_filters( 'give_thailand_states', $states );
2249
+	return apply_filters('give_thailand_states', $states);
2250 2250
 }
2251 2251
 
2252 2252
 /**
@@ -2258,59 +2258,59 @@  discard block
 block discarded – undo
2258 2258
 function give_get_spain_states_list() {
2259 2259
 	$states = array(
2260 2260
 		''   => '',
2261
-		'C'  => esc_html__( 'A Coruña', 'give' ),
2262
-		'VI' => esc_html__( 'Álava', 'give' ),
2263
-		'AB' => esc_html__( 'Albacete', 'give' ),
2264
-		'A'  => esc_html__( 'Alicante', 'give' ),
2265
-		'AL' => esc_html__( 'Almería', 'give' ),
2266
-		'O'  => esc_html__( 'Asturias', 'give' ),
2267
-		'AV' => esc_html__( 'Ávila', 'give' ),
2268
-		'BA' => esc_html__( 'Badajoz', 'give' ),
2269
-		'PM' => esc_html__( 'Baleares', 'give' ),
2270
-		'B'  => esc_html__( 'Barcelona', 'give' ),
2271
-		'BU' => esc_html__( 'Burgos', 'give' ),
2272
-		'CC' => esc_html__( 'Cáceres', 'give' ),
2273
-		'CA' => esc_html__( 'Cádiz', 'give' ),
2274
-		'S'  => esc_html__( 'Cantabria', 'give' ),
2275
-		'CS' => esc_html__( 'Castellón', 'give' ),
2276
-		'CE' => esc_html__( 'Ceuta', 'give' ),
2277
-		'CR' => esc_html__( 'Ciudad Real', 'give' ),
2278
-		'CO' => esc_html__( 'Córdoba', 'give' ),
2279
-		'CU' => esc_html__( 'Cuenca', 'give' ),
2280
-		'GI' => esc_html__( 'Girona', 'give' ),
2281
-		'GR' => esc_html__( 'Granada', 'give' ),
2282
-		'GU' => esc_html__( 'Guadalajara', 'give' ),
2283
-		'SS' => esc_html__( 'Gipuzkoa', 'give' ),
2284
-		'H'  => esc_html__( 'Huelva', 'give' ),
2285
-		'HU' => esc_html__( 'Huesca', 'give' ),
2286
-		'J'  => esc_html__( 'Jaén', 'give' ),
2287
-		'LO' => esc_html__( 'La Rioja', 'give' ),
2288
-		'GC' => esc_html__( 'Las Palmas', 'give' ),
2289
-		'LE' => esc_html__( 'León', 'give' ),
2290
-		'L'  => esc_html__( 'Lleida', 'give' ),
2291
-		'LU' => esc_html__( 'Lugo', 'give' ),
2292
-		'M'  => esc_html__( 'Madrid', 'give' ),
2293
-		'MA' => esc_html__( 'Málaga', 'give' ),
2294
-		'ML' => esc_html__( 'Melilla', 'give' ),
2295
-		'MU' => esc_html__( 'Murcia', 'give' ),
2296
-		'NA' => esc_html__( 'Navarra', 'give' ),
2297
-		'OR' => esc_html__( 'Ourense', 'give' ),
2298
-		'P'  => esc_html__( 'Palencia', 'give' ),
2299
-		'PO' => esc_html__( 'Pontevedra', 'give' ),
2300
-		'SA' => esc_html__( 'Salamanca', 'give' ),
2301
-		'TF' => esc_html__( 'Santa Cruz de Tenerife', 'give' ),
2302
-		'SG' => esc_html__( 'Segovia', 'give' ),
2303
-		'SE' => esc_html__( 'Sevilla', 'give' ),
2304
-		'SO' => esc_html__( 'Soria', 'give' ),
2305
-		'T'  => esc_html__( 'Tarragona', 'give' ),
2306
-		'TE' => esc_html__( 'Teruel', 'give' ),
2307
-		'TO' => esc_html__( 'Toledo', 'give' ),
2308
-		'V'  => esc_html__( 'Valencia', 'give' ),
2309
-		'VA' => esc_html__( 'Valladolid', 'give' ),
2310
-		'BI' => esc_html__( 'Bizkaia', 'give' ),
2311
-		'ZA' => esc_html__( 'Zamora', 'give' ),
2312
-		'Z'  => esc_html__( 'Zaragoza', 'give' ),
2261
+		'C'  => esc_html__('A Coruña', 'give'),
2262
+		'VI' => esc_html__('Álava', 'give'),
2263
+		'AB' => esc_html__('Albacete', 'give'),
2264
+		'A'  => esc_html__('Alicante', 'give'),
2265
+		'AL' => esc_html__('Almería', 'give'),
2266
+		'O'  => esc_html__('Asturias', 'give'),
2267
+		'AV' => esc_html__('Ávila', 'give'),
2268
+		'BA' => esc_html__('Badajoz', 'give'),
2269
+		'PM' => esc_html__('Baleares', 'give'),
2270
+		'B'  => esc_html__('Barcelona', 'give'),
2271
+		'BU' => esc_html__('Burgos', 'give'),
2272
+		'CC' => esc_html__('Cáceres', 'give'),
2273
+		'CA' => esc_html__('Cádiz', 'give'),
2274
+		'S'  => esc_html__('Cantabria', 'give'),
2275
+		'CS' => esc_html__('Castellón', 'give'),
2276
+		'CE' => esc_html__('Ceuta', 'give'),
2277
+		'CR' => esc_html__('Ciudad Real', 'give'),
2278
+		'CO' => esc_html__('Córdoba', 'give'),
2279
+		'CU' => esc_html__('Cuenca', 'give'),
2280
+		'GI' => esc_html__('Girona', 'give'),
2281
+		'GR' => esc_html__('Granada', 'give'),
2282
+		'GU' => esc_html__('Guadalajara', 'give'),
2283
+		'SS' => esc_html__('Gipuzkoa', 'give'),
2284
+		'H'  => esc_html__('Huelva', 'give'),
2285
+		'HU' => esc_html__('Huesca', 'give'),
2286
+		'J'  => esc_html__('Jaén', 'give'),
2287
+		'LO' => esc_html__('La Rioja', 'give'),
2288
+		'GC' => esc_html__('Las Palmas', 'give'),
2289
+		'LE' => esc_html__('León', 'give'),
2290
+		'L'  => esc_html__('Lleida', 'give'),
2291
+		'LU' => esc_html__('Lugo', 'give'),
2292
+		'M'  => esc_html__('Madrid', 'give'),
2293
+		'MA' => esc_html__('Málaga', 'give'),
2294
+		'ML' => esc_html__('Melilla', 'give'),
2295
+		'MU' => esc_html__('Murcia', 'give'),
2296
+		'NA' => esc_html__('Navarra', 'give'),
2297
+		'OR' => esc_html__('Ourense', 'give'),
2298
+		'P'  => esc_html__('Palencia', 'give'),
2299
+		'PO' => esc_html__('Pontevedra', 'give'),
2300
+		'SA' => esc_html__('Salamanca', 'give'),
2301
+		'TF' => esc_html__('Santa Cruz de Tenerife', 'give'),
2302
+		'SG' => esc_html__('Segovia', 'give'),
2303
+		'SE' => esc_html__('Sevilla', 'give'),
2304
+		'SO' => esc_html__('Soria', 'give'),
2305
+		'T'  => esc_html__('Tarragona', 'give'),
2306
+		'TE' => esc_html__('Teruel', 'give'),
2307
+		'TO' => esc_html__('Toledo', 'give'),
2308
+		'V'  => esc_html__('Valencia', 'give'),
2309
+		'VA' => esc_html__('Valladolid', 'give'),
2310
+		'BI' => esc_html__('Bizkaia', 'give'),
2311
+		'ZA' => esc_html__('Zamora', 'give'),
2312
+		'Z'  => esc_html__('Zaragoza', 'give'),
2313 2313
 	);
2314 2314
 
2315
-	return apply_filters( 'give_spain_states', $states );
2315
+	return apply_filters('give_spain_states', $states);
2316 2316
 }
Please login to merge, or discard this patch.
templates/emails/header-default.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -6,16 +6,16 @@  discard block
 block discarded – undo
6 6
  * @version     1.0
7 7
  */
8 8
 
9
-if ( ! defined( 'ABSPATH' ) ) {
9
+if ( ! defined('ABSPATH')) {
10 10
 	exit;
11 11
 } // Exit if accessed directly.
12 12
 
13 13
 // For gmail compatibility, including CSS styles in head/body are stripped out therefore styles need to be inline. These variables contain rules which are added to the template inline. !important; is a gmail hack to prevent styles being stripped if it doesn't like something.
14
-$body               = "
14
+$body = "
15 15
 	background-color: #f6f6f6;
16 16
 	font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;
17 17
 ";
18
-$wrapper            = "
18
+$wrapper = "
19 19
 	width:100%;
20 20
 	-webkit-text-size-adjust:none !important;
21 21
 	margin:0;
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
 	text-align: center;
43 43
 	vertical-align:middle;
44 44
 ";
45
-$body_content       = "
45
+$body_content = "
46 46
 	border-radius:3px !important;
47 47
 	font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;
48 48
 ";
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
 	line-height:150%;
54 54
 	text-align:left;
55 55
 ";
56
-$header_content_h1  = "
56
+$header_content_h1 = "
57 57
 	color: #000000;
58 58
 	margin:0;
59 59
 	padding: 28px 24px;
@@ -63,13 +63,13 @@  discard block
 block discarded – undo
63 63
 	font-weight: 500;
64 64
 	line-height: 1.2;
65 65
 ";
66
-$header_img         = give_get_option( 'email_logo', '' );
66
+$header_img = give_get_option('email_logo', '');
67 67
 ?>
68 68
 <!DOCTYPE html>
69 69
 <html>
70 70
 <head>
71 71
 	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
72
-	<title><?php echo get_bloginfo( 'name' ); ?></title>
72
+	<title><?php echo get_bloginfo('name'); ?></title>
73 73
 </head>
74 74
 <body leftmargin="0" marginwidth="0" topmargin="0" marginheight="0" offset="0" style="<?php echo $body; ?>">
75 75
 <div style="<?php echo $wrapper; ?>">
@@ -77,9 +77,9 @@  discard block
 block discarded – undo
77 77
 		<tr>
78 78
 			<td align="center" valign="top">
79 79
 				<?php
80
-				if ( ! empty( $header_img ) ) : ?>
80
+				if ( ! empty($header_img)) : ?>
81 81
 					<div id="template_header_image">
82
-						<?php echo '<p style="margin-top:0;"><img style="' . $template_image . '" src="' . esc_url( $header_img ) . '" alt="' . get_bloginfo( 'name' ) . '" /></p>'; ?>
82
+						<?php echo '<p style="margin-top:0;"><img style="'.$template_image.'" src="'.esc_url($header_img).'" alt="'.get_bloginfo('name').'" /></p>'; ?>
83 83
 					</div>
84 84
 				<?php endif; ?>
85 85
 				<table border="0" cellpadding="0" cellspacing="0" width="600" id="template_container" style="<?php echo $template_container; ?>">
Please login to merge, or discard this patch.
templates/emails/body.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@
 block discarded – undo
6 6
  * @version     1.0
7 7
  */
8 8
 
9
-if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly.
9
+if ( ! defined('ABSPATH')) exit; // Exit if accessed directly.
10 10
 
11 11
 // {email} is replaced by the content entered in Donations > Settings > Emails
12 12
 
Please login to merge, or discard this patch.
Braces   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,7 +6,10 @@
 block discarded – undo
6 6
  * @version     1.0
7 7
  */
8 8
 
9
-if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly.
9
+if ( ! defined( 'ABSPATH' ) ) {
10
+	exit;
11
+}
12
+// Exit if accessed directly.
10 13
 
11 14
 // {email} is replaced by the content entered in Donations > Settings > Emails
12 15
 
Please login to merge, or discard this patch.
includes/plugin-compatibility.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -39,8 +39,8 @@
 block discarded – undo
39 39
 	}
40 40
 
41 41
 	if ( ( is_plugin_active( 'wordpress-seo/wp-seo.php' )
42
-	       || is_plugin_active( 'wordpress-seo-premium/wp-seo-premium.php' ) )
43
-	     && class_exists( 'WPSEO_Sitemaps_Cache' )
42
+		   || is_plugin_active( 'wordpress-seo-premium/wp-seo-premium.php' ) )
43
+		 && class_exists( 'WPSEO_Sitemaps_Cache' )
44 44
 	) {
45 45
 
46 46
 		$forms_singular_option = give_get_option( 'forms_singular' );
Please login to merge, or discard this patch.
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -19,10 +19,10 @@  discard block
 block discarded – undo
19 19
  * @return void
20 20
  */
21 21
 function give_disable_mandrill_nl2br() {
22
-	add_filter( 'mandrill_nl2br', '__return_false' );
22
+	add_filter('mandrill_nl2br', '__return_false');
23 23
 }
24 24
 
25
-add_action( 'give_email_send_before', 'give_disable_mandrill_nl2br' );
25
+add_action('give_email_send_before', 'give_disable_mandrill_nl2br');
26 26
 
27 27
 
28 28
 /**
@@ -34,30 +34,30 @@  discard block
 block discarded – undo
34 34
  */
35 35
 function give_clear_seo_sitemap_cache_on_settings_change() {
36 36
 	// Load required file if the fn 'is_plugin_active' doesn't exists.
37
-	if ( ! function_exists( 'is_plugin_active' ) ) {
38
-		require_once ABSPATH . 'wp-admin/includes/plugin.php';
37
+	if ( ! function_exists('is_plugin_active')) {
38
+		require_once ABSPATH.'wp-admin/includes/plugin.php';
39 39
 	}
40 40
 
41
-	if ( ( is_plugin_active( 'wordpress-seo/wp-seo.php' )
42
-	       || is_plugin_active( 'wordpress-seo-premium/wp-seo-premium.php' ) )
43
-	     && class_exists( 'WPSEO_Sitemaps_Cache' )
41
+	if ((is_plugin_active('wordpress-seo/wp-seo.php')
42
+	       || is_plugin_active('wordpress-seo-premium/wp-seo-premium.php'))
43
+	     && class_exists('WPSEO_Sitemaps_Cache')
44 44
 	) {
45 45
 
46
-		$forms_singular_option = give_get_option( 'forms_singular' );
47
-		$forms_archive_option  = give_get_option( 'forms_singular' );
46
+		$forms_singular_option = give_get_option('forms_singular');
47
+		$forms_archive_option  = give_get_option('forms_singular');
48 48
 
49 49
 		// If there is change detected for Single Form View and Form Archives options then proceed.
50 50
 		if (
51
-			( isset( $_POST['forms_singular'] ) && $_POST['forms_singular'] !== $forms_singular_option ) ||
52
-			( isset( $_POST['forms_archives'] ) && $_POST['forms_archives'] !== $forms_archive_option )
51
+			(isset($_POST['forms_singular']) && $_POST['forms_singular'] !== $forms_singular_option) ||
52
+			(isset($_POST['forms_archives']) && $_POST['forms_archives'] !== $forms_archive_option)
53 53
 		) {
54 54
 			// If Yoast SEO or Yoast SEO Premium plugin exists, then update seo sitemap cache.
55 55
 			$yoast_sitemaps_cache = new WPSEO_Sitemaps_Cache();
56
-			if ( method_exists( $yoast_sitemaps_cache, 'clear' ) ) {
56
+			if (method_exists($yoast_sitemaps_cache, 'clear')) {
57 57
 				WPSEO_Sitemaps_Cache::clear();
58 58
 			}
59 59
 		}
60 60
 	}
61 61
 }
62 62
 
63
-add_action( 'give-settings_save_display', 'give_clear_seo_sitemap_cache_on_settings_change' );
63
+add_action('give-settings_save_display', 'give_clear_seo_sitemap_cache_on_settings_change');
Please login to merge, or discard this patch.
includes/post-types.php 1 patch
Spacing   +148 added lines, -148 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
  */
11 11
 
12 12
 // Exit if accessed directly.
13
-if ( ! defined( 'ABSPATH' ) ) {
13
+if ( ! defined('ABSPATH')) {
14 14
 	exit;
15 15
 }
16 16
 
@@ -23,36 +23,36 @@  discard block
 block discarded – undo
23 23
 function give_setup_post_types() {
24 24
 
25 25
 	// Give Forms single post and archive options.
26
-	$give_forms_singular = give_is_setting_enabled( give_get_option( 'forms_singular' ) );
27
-	$give_forms_archives = give_is_setting_enabled( give_get_option( 'forms_archives' ) );
26
+	$give_forms_singular = give_is_setting_enabled(give_get_option('forms_singular'));
27
+	$give_forms_archives = give_is_setting_enabled(give_get_option('forms_archives'));
28 28
 
29
-	$give_forms_slug = defined( 'GIVE_SLUG' ) ? GIVE_SLUG : 'donations';
29
+	$give_forms_slug = defined('GIVE_SLUG') ? GIVE_SLUG : 'donations';
30 30
 	// Support for old 'GIVE_FORMS_SLUG' constant
31
-	if ( defined( 'GIVE_FORMS_SLUG' ) ) {
31
+	if (defined('GIVE_FORMS_SLUG')) {
32 32
 		$give_forms_slug = GIVE_FORMS_SLUG;
33 33
 	}
34 34
 
35
-	$give_forms_rewrite = defined( 'GIVE_DISABLE_FORMS_REWRITE' ) && GIVE_DISABLE_FORMS_REWRITE ? false : array(
35
+	$give_forms_rewrite = defined('GIVE_DISABLE_FORMS_REWRITE') && GIVE_DISABLE_FORMS_REWRITE ? false : array(
36 36
 		'slug'       => $give_forms_slug,
37 37
 		'with_front' => false,
38 38
 	);
39 39
 
40
-	$give_forms_labels = apply_filters( 'give_forms_labels', array(
41
-		'name'               => __( 'Donation Forms', 'give' ),
42
-		'singular_name'      => __( 'Form', 'give' ),
43
-		'add_new'            => __( 'Add Form', 'give' ),
44
-		'add_new_item'       => __( 'Add New Donation Form', 'give' ),
45
-		'edit_item'          => __( 'Edit Donation Form', 'give' ),
46
-		'new_item'           => __( 'New Form', 'give' ),
47
-		'all_items'          => __( 'All Forms', 'give' ),
48
-		'view_item'          => __( 'View Form', 'give' ),
49
-		'search_items'       => __( 'Search Forms', 'give' ),
50
-		'not_found'          => __( 'No forms found.', 'give' ),
51
-		'not_found_in_trash' => __( 'No forms found in Trash.', 'give' ),
40
+	$give_forms_labels = apply_filters('give_forms_labels', array(
41
+		'name'               => __('Donation Forms', 'give'),
42
+		'singular_name'      => __('Form', 'give'),
43
+		'add_new'            => __('Add Form', 'give'),
44
+		'add_new_item'       => __('Add New Donation Form', 'give'),
45
+		'edit_item'          => __('Edit Donation Form', 'give'),
46
+		'new_item'           => __('New Form', 'give'),
47
+		'all_items'          => __('All Forms', 'give'),
48
+		'view_item'          => __('View Form', 'give'),
49
+		'search_items'       => __('Search Forms', 'give'),
50
+		'not_found'          => __('No forms found.', 'give'),
51
+		'not_found_in_trash' => __('No forms found in Trash.', 'give'),
52 52
 		'parent_item_colon'  => '',
53
-		'menu_name'          => apply_filters( 'give_menu_name', __( 'Donations', 'give' ) ),
54
-		'name_admin_bar'     => apply_filters( 'give_name_admin_bar_name', __( 'Donation Form', 'give' ) ),
55
-	) );
53
+		'menu_name'          => apply_filters('give_menu_name', __('Donations', 'give')),
54
+		'name_admin_bar'     => apply_filters('give_name_admin_bar_name', __('Donation Form', 'give')),
55
+	));
56 56
 
57 57
 	// Default give_forms supports.
58 58
 	$give_form_supports = array(
@@ -64,14 +64,14 @@  discard block
 block discarded – undo
64 64
 	);
65 65
 
66 66
 	// Has the user disabled the excerpt?
67
-	if ( ! give_is_setting_enabled( give_get_option( 'forms_excerpt' ) ) ) {
68
-		unset( $give_form_supports[2] );
67
+	if ( ! give_is_setting_enabled(give_get_option('forms_excerpt'))) {
68
+		unset($give_form_supports[2]);
69 69
 	}
70 70
 
71 71
 	// Has user disabled the featured image?
72
-	if ( ! give_is_setting_enabled( give_get_option( 'form_featured_img' ) ) ) {
73
-		unset( $give_form_supports[1] );
74
-		remove_action( 'give_before_single_form_summary', 'give_show_form_images' );
72
+	if ( ! give_is_setting_enabled(give_get_option('form_featured_img'))) {
73
+		unset($give_form_supports[1]);
74
+		remove_action('give_before_single_form_summary', 'give_show_form_images');
75 75
 	}
76 76
 
77 77
 	$give_forms_args = array(
@@ -86,42 +86,42 @@  discard block
 block discarded – undo
86 86
 		'has_archive'        => $give_forms_archives,
87 87
 		'menu_icon'          => 'dashicons-give',
88 88
 		'hierarchical'       => false,
89
-		'supports'           => apply_filters( 'give_forms_supports', $give_form_supports ),
89
+		'supports'           => apply_filters('give_forms_supports', $give_form_supports),
90 90
 	);
91
-	register_post_type( 'give_forms', apply_filters( 'give_forms_post_type_args', $give_forms_args ) );
91
+	register_post_type('give_forms', apply_filters('give_forms_post_type_args', $give_forms_args));
92 92
 
93 93
 	/** Donation Post Type */
94 94
 	$payment_labels = array(
95
-		'name'               => _x( 'Donations', 'post type general name', 'give' ),
96
-		'singular_name'      => _x( 'Donation', 'post type singular name', 'give' ),
97
-		'add_new'            => __( 'Add New', 'give' ),
98
-		'add_new_item'       => __( 'Add New Donation', 'give' ),
99
-		'edit_item'          => __( 'Edit Donation', 'give' ),
100
-		'new_item'           => __( 'New Donation', 'give' ),
101
-		'all_items'          => __( 'All Donations', 'give' ),
102
-		'view_item'          => __( 'View Donation', 'give' ),
103
-		'search_items'       => __( 'Search Donations', 'give' ),
104
-		'not_found'          => __( 'No donations found.', 'give' ),
105
-		'not_found_in_trash' => __( 'No donations found in Trash.', 'give' ),
95
+		'name'               => _x('Donations', 'post type general name', 'give'),
96
+		'singular_name'      => _x('Donation', 'post type singular name', 'give'),
97
+		'add_new'            => __('Add New', 'give'),
98
+		'add_new_item'       => __('Add New Donation', 'give'),
99
+		'edit_item'          => __('Edit Donation', 'give'),
100
+		'new_item'           => __('New Donation', 'give'),
101
+		'all_items'          => __('All Donations', 'give'),
102
+		'view_item'          => __('View Donation', 'give'),
103
+		'search_items'       => __('Search Donations', 'give'),
104
+		'not_found'          => __('No donations found.', 'give'),
105
+		'not_found_in_trash' => __('No donations found in Trash.', 'give'),
106 106
 		'parent_item_colon'  => '',
107
-		'menu_name'          => __( 'Donations', 'give' ),
107
+		'menu_name'          => __('Donations', 'give'),
108 108
 	);
109 109
 
110 110
 	$payment_args = array(
111
-		'labels'          => apply_filters( 'give_payment_labels', $payment_labels ),
111
+		'labels'          => apply_filters('give_payment_labels', $payment_labels),
112 112
 		'public'          => false,
113 113
 		'query_var'       => false,
114 114
 		'rewrite'         => false,
115 115
 		'map_meta_cap'    => true,
116 116
 		'capability_type' => 'give_payment',
117
-		'supports'        => array( 'title' ),
117
+		'supports'        => array('title'),
118 118
 		'can_export'      => true,
119 119
 	);
120
-	register_post_type( 'give_payment', $payment_args );
120
+	register_post_type('give_payment', $payment_args);
121 121
 
122 122
 }
123 123
 
124
-add_action( 'init', 'give_setup_post_types', 1 );
124
+add_action('init', 'give_setup_post_types', 1);
125 125
 
126 126
 
127 127
 /**
@@ -134,30 +134,30 @@  discard block
 block discarded – undo
134 134
  */
135 135
 function give_setup_taxonomies() {
136 136
 
137
-	$slug = defined( 'GIVE_FORMS_SLUG' ) ? GIVE_FORMS_SLUG : 'donations';
137
+	$slug = defined('GIVE_FORMS_SLUG') ? GIVE_FORMS_SLUG : 'donations';
138 138
 
139 139
 	/** Categories */
140 140
 	$category_labels = array(
141
-		'name'              => _x( 'Form Categories', 'taxonomy general name', 'give' ),
142
-		'singular_name'     => _x( 'Category', 'taxonomy singular name', 'give' ),
143
-		'search_items'      => __( 'Search Categories', 'give' ),
144
-		'all_items'         => __( 'All Categories', 'give' ),
145
-		'parent_item'       => __( 'Parent Category', 'give' ),
146
-		'parent_item_colon' => __( 'Parent Category:', 'give' ),
147
-		'edit_item'         => __( 'Edit Category', 'give' ),
148
-		'update_item'       => __( 'Update Category', 'give' ),
149
-		'add_new_item'      => __( 'Add New Category', 'give' ),
150
-		'new_item_name'     => __( 'New Category Name', 'give' ),
151
-		'menu_name'         => __( 'Categories', 'give' ),
141
+		'name'              => _x('Form Categories', 'taxonomy general name', 'give'),
142
+		'singular_name'     => _x('Category', 'taxonomy singular name', 'give'),
143
+		'search_items'      => __('Search Categories', 'give'),
144
+		'all_items'         => __('All Categories', 'give'),
145
+		'parent_item'       => __('Parent Category', 'give'),
146
+		'parent_item_colon' => __('Parent Category:', 'give'),
147
+		'edit_item'         => __('Edit Category', 'give'),
148
+		'update_item'       => __('Update Category', 'give'),
149
+		'add_new_item'      => __('Add New Category', 'give'),
150
+		'new_item_name'     => __('New Category Name', 'give'),
151
+		'menu_name'         => __('Categories', 'give'),
152 152
 	);
153 153
 
154
-	$category_args = apply_filters( 'give_forms_category_args', array(
154
+	$category_args = apply_filters('give_forms_category_args', array(
155 155
 			'hierarchical' => true,
156
-			'labels'       => apply_filters( 'give_forms_category_labels', $category_labels ),
156
+			'labels'       => apply_filters('give_forms_category_labels', $category_labels),
157 157
 			'show_ui'      => true,
158 158
 			'query_var'    => 'give_forms_category',
159 159
 			'rewrite'      => array(
160
-				'slug'         => $slug . '/category',
160
+				'slug'         => $slug.'/category',
161 161
 				'with_front'   => false,
162 162
 				'hierarchical' => true,
163 163
 			),
@@ -171,33 +171,33 @@  discard block
 block discarded – undo
171 171
 	);
172 172
 
173 173
 	// Does the user want categories?
174
-	if ( give_is_setting_enabled( give_get_option( 'categories', 'disabled' ) ) ) {
175
-		register_taxonomy( 'give_forms_category', array( 'give_forms' ), $category_args );
176
-		register_taxonomy_for_object_type( 'give_forms_category', 'give_forms' );
174
+	if (give_is_setting_enabled(give_get_option('categories', 'disabled'))) {
175
+		register_taxonomy('give_forms_category', array('give_forms'), $category_args);
176
+		register_taxonomy_for_object_type('give_forms_category', 'give_forms');
177 177
 	}
178 178
 
179 179
 	/** Tags */
180 180
 	$tag_labels = array(
181
-		'name'                  => _x( 'Form Tags', 'taxonomy general name', 'give' ),
182
-		'singular_name'         => _x( 'Tag', 'taxonomy singular name', 'give' ),
183
-		'search_items'          => __( 'Search Tags', 'give' ),
184
-		'all_items'             => __( 'All Tags', 'give' ),
185
-		'parent_item'           => __( 'Parent Tag', 'give' ),
186
-		'parent_item_colon'     => __( 'Parent Tag:', 'give' ),
187
-		'edit_item'             => __( 'Edit Tag', 'give' ),
188
-		'update_item'           => __( 'Update Tag', 'give' ),
189
-		'add_new_item'          => __( 'Add New Tag', 'give' ),
190
-		'new_item_name'         => __( 'New Tag Name', 'give' ),
191
-		'menu_name'             => __( 'Tags', 'give' ),
192
-		'choose_from_most_used' => __( 'Choose from most used tags.', 'give' ),
181
+		'name'                  => _x('Form Tags', 'taxonomy general name', 'give'),
182
+		'singular_name'         => _x('Tag', 'taxonomy singular name', 'give'),
183
+		'search_items'          => __('Search Tags', 'give'),
184
+		'all_items'             => __('All Tags', 'give'),
185
+		'parent_item'           => __('Parent Tag', 'give'),
186
+		'parent_item_colon'     => __('Parent Tag:', 'give'),
187
+		'edit_item'             => __('Edit Tag', 'give'),
188
+		'update_item'           => __('Update Tag', 'give'),
189
+		'add_new_item'          => __('Add New Tag', 'give'),
190
+		'new_item_name'         => __('New Tag Name', 'give'),
191
+		'menu_name'             => __('Tags', 'give'),
192
+		'choose_from_most_used' => __('Choose from most used tags.', 'give'),
193 193
 	);
194 194
 
195
-	$tag_args = apply_filters( 'give_forms_tag_args', array(
195
+	$tag_args = apply_filters('give_forms_tag_args', array(
196 196
 			'hierarchical' => false,
197
-			'labels'       => apply_filters( 'give_forms_tag_labels', $tag_labels ),
197
+			'labels'       => apply_filters('give_forms_tag_labels', $tag_labels),
198 198
 			'show_ui'      => true,
199 199
 			'query_var'    => 'give_forms_tag',
200
-			'rewrite'      => array( 'slug' => $slug . '/tag', 'with_front' => false, 'hierarchical' => true ),
200
+			'rewrite'      => array('slug' => $slug.'/tag', 'with_front' => false, 'hierarchical' => true),
201 201
 			'capabilities' => array(
202 202
 				'manage_terms' => 'manage_give_form_terms',
203 203
 				'edit_terms'   => 'edit_give_form_terms',
@@ -207,14 +207,14 @@  discard block
 block discarded – undo
207 207
 		)
208 208
 	);
209 209
 
210
-	if ( give_is_setting_enabled( give_get_option( 'tags', 'disabled' ) ) ) {
211
-		register_taxonomy( 'give_forms_tag', array( 'give_forms' ), $tag_args );
212
-		register_taxonomy_for_object_type( 'give_forms_tag', 'give_forms' );
210
+	if (give_is_setting_enabled(give_get_option('tags', 'disabled'))) {
211
+		register_taxonomy('give_forms_tag', array('give_forms'), $tag_args);
212
+		register_taxonomy_for_object_type('give_forms_tag', 'give_forms');
213 213
 	}
214 214
 
215 215
 }
216 216
 
217
-add_action( 'init', 'give_setup_taxonomies', 0 );
217
+add_action('init', 'give_setup_taxonomies', 0);
218 218
 
219 219
 
220 220
 /**
@@ -225,11 +225,11 @@  discard block
 block discarded – undo
225 225
  */
226 226
 function give_get_default_form_labels() {
227 227
 	$defaults = array(
228
-		'singular' => __( 'Form', 'give' ),
229
-		'plural'   => __( 'Forms', 'give' ),
228
+		'singular' => __('Form', 'give'),
229
+		'plural'   => __('Forms', 'give'),
230 230
 	);
231 231
 
232
-	return apply_filters( 'give_default_form_name', $defaults );
232
+	return apply_filters('give_default_form_name', $defaults);
233 233
 }
234 234
 
235 235
 /**
@@ -241,10 +241,10 @@  discard block
 block discarded – undo
241 241
  *
242 242
  * @return string $defaults['singular'] Singular label
243 243
  */
244
-function give_get_forms_label_singular( $lowercase = false ) {
244
+function give_get_forms_label_singular($lowercase = false) {
245 245
 	$defaults = give_get_default_form_labels();
246 246
 
247
-	return ( $lowercase ) ? strtolower( $defaults['singular'] ) : $defaults['singular'];
247
+	return ($lowercase) ? strtolower($defaults['singular']) : $defaults['singular'];
248 248
 }
249 249
 
250 250
 /**
@@ -253,10 +253,10 @@  discard block
 block discarded – undo
253 253
  * @since 1.0
254 254
  * @return string $defaults['plural'] Plural label
255 255
  */
256
-function give_get_forms_label_plural( $lowercase = false ) {
256
+function give_get_forms_label_plural($lowercase = false) {
257 257
 	$defaults = give_get_default_form_labels();
258 258
 
259
-	return ( $lowercase ) ? strtolower( $defaults['plural'] ) : $defaults['plural'];
259
+	return ($lowercase) ? strtolower($defaults['plural']) : $defaults['plural'];
260 260
 }
261 261
 
262 262
 /**
@@ -268,24 +268,24 @@  discard block
 block discarded – undo
268 268
  *
269 269
  * @return string $title New placeholder text
270 270
  */
271
-function give_change_default_title( $title ) {
271
+function give_change_default_title($title) {
272 272
 	// If a frontend plugin uses this filter (check extensions before changing this function)
273
-	if ( ! is_admin() ) {
274
-		$title = __( 'Enter form title here', 'give' );
273
+	if ( ! is_admin()) {
274
+		$title = __('Enter form title here', 'give');
275 275
 
276 276
 		return $title;
277 277
 	}
278 278
 
279 279
 	$screen = get_current_screen();
280 280
 
281
-	if ( 'give_forms' == $screen->post_type ) {
282
-		$title = __( 'Enter form title here', 'give' );
281
+	if ('give_forms' == $screen->post_type) {
282
+		$title = __('Enter form title here', 'give');
283 283
 	}
284 284
 
285 285
 	return $title;
286 286
 }
287 287
 
288
-add_filter( 'enter_title_here', 'give_change_default_title' );
288
+add_filter('enter_title_here', 'give_change_default_title');
289 289
 
290 290
 /**
291 291
  * Registers Custom Post Statuses which are used by the Payments
@@ -295,67 +295,67 @@  discard block
 block discarded – undo
295 295
  */
296 296
 function give_register_post_type_statuses() {
297 297
 	// Payment Statuses
298
-	register_post_status( 'refunded', array(
299
-		'label'                     => __( 'Refunded', 'give' ),
298
+	register_post_status('refunded', array(
299
+		'label'                     => __('Refunded', 'give'),
300 300
 		'public'                    => true,
301 301
 		'exclude_from_search'       => false,
302 302
 		'show_in_admin_all_list'    => true,
303 303
 		'show_in_admin_status_list' => true,
304
-		'label_count'               => _n_noop( 'Refunded <span class="count">(%s)</span>', 'Refunded <span class="count">(%s)</span>', 'give' ),
305
-	) );
306
-	register_post_status( 'failed', array(
307
-		'label'                     => __( 'Failed', 'give' ),
304
+		'label_count'               => _n_noop('Refunded <span class="count">(%s)</span>', 'Refunded <span class="count">(%s)</span>', 'give'),
305
+	));
306
+	register_post_status('failed', array(
307
+		'label'                     => __('Failed', 'give'),
308 308
 		'public'                    => true,
309 309
 		'exclude_from_search'       => false,
310 310
 		'show_in_admin_all_list'    => true,
311 311
 		'show_in_admin_status_list' => true,
312
-		'label_count'               => _n_noop( 'Failed <span class="count">(%s)</span>', 'Failed <span class="count">(%s)</span>', 'give' ),
313
-	) );
314
-	register_post_status( 'revoked', array(
315
-		'label'                     => __( 'Revoked', 'give' ),
312
+		'label_count'               => _n_noop('Failed <span class="count">(%s)</span>', 'Failed <span class="count">(%s)</span>', 'give'),
313
+	));
314
+	register_post_status('revoked', array(
315
+		'label'                     => __('Revoked', 'give'),
316 316
 		'public'                    => true,
317 317
 		'exclude_from_search'       => false,
318 318
 		'show_in_admin_all_list'    => true,
319 319
 		'show_in_admin_status_list' => true,
320
-		'label_count'               => _n_noop( 'Revoked <span class="count">(%s)</span>', 'Revoked <span class="count">(%s)</span>', 'give' ),
321
-	) );
322
-	register_post_status( 'cancelled', array(
323
-		'label'                     => __( 'Cancelled', 'give' ),
320
+		'label_count'               => _n_noop('Revoked <span class="count">(%s)</span>', 'Revoked <span class="count">(%s)</span>', 'give'),
321
+	));
322
+	register_post_status('cancelled', array(
323
+		'label'                     => __('Cancelled', 'give'),
324 324
 		'public'                    => true,
325 325
 		'exclude_from_search'       => false,
326 326
 		'show_in_admin_all_list'    => true,
327 327
 		'show_in_admin_status_list' => true,
328
-		'label_count'               => _n_noop( 'Cancelled <span class="count">(%s)</span>', 'Cancelled <span class="count">(%s)</span>', 'give' ),
329
-	) );
330
-	register_post_status( 'abandoned', array(
331
-		'label'                     => __( 'Abandoned', 'give' ),
328
+		'label_count'               => _n_noop('Cancelled <span class="count">(%s)</span>', 'Cancelled <span class="count">(%s)</span>', 'give'),
329
+	));
330
+	register_post_status('abandoned', array(
331
+		'label'                     => __('Abandoned', 'give'),
332 332
 		'public'                    => true,
333 333
 		'exclude_from_search'       => false,
334 334
 		'show_in_admin_all_list'    => true,
335 335
 		'show_in_admin_status_list' => true,
336
-		'label_count'               => _n_noop( 'Abandoned <span class="count">(%s)</span>', 'Abandoned <span class="count">(%s)</span>', 'give' ),
337
-	) );
338
-	register_post_status( 'processing', array(
339
-		'label'                     => _x( 'Processing', 'Processing payment status', 'give' ),
336
+		'label_count'               => _n_noop('Abandoned <span class="count">(%s)</span>', 'Abandoned <span class="count">(%s)</span>', 'give'),
337
+	));
338
+	register_post_status('processing', array(
339
+		'label'                     => _x('Processing', 'Processing payment status', 'give'),
340 340
 		'public'                    => true,
341 341
 		'exclude_from_search'       => false,
342 342
 		'show_in_admin_all_list'    => true,
343 343
 		'show_in_admin_status_list' => true,
344
-		'label_count'               => _n_noop( 'Processing <span class="count">(%s)</span>', 'Processing <span class="count">(%s)</span>', 'give' )
345
-	)  );
344
+		'label_count'               => _n_noop('Processing <span class="count">(%s)</span>', 'Processing <span class="count">(%s)</span>', 'give')
345
+	));
346 346
 
347
-	register_post_status( 'preapproval', array(
348
-		'label'                     => _x( 'Preapproval', 'Preapproval payment status', 'give' ),
347
+	register_post_status('preapproval', array(
348
+		'label'                     => _x('Preapproval', 'Preapproval payment status', 'give'),
349 349
 		'public'                    => true,
350 350
 		'exclude_from_search'       => false,
351 351
 		'show_in_admin_all_list'    => true,
352 352
 		'show_in_admin_status_list' => true,
353
-		'label_count'               => _n_noop( 'Preapproval <span class="count">(%s)</span>', 'Preapproval <span class="count">(%s)</span>', 'give' ),
354
-	) );
353
+		'label_count'               => _n_noop('Preapproval <span class="count">(%s)</span>', 'Preapproval <span class="count">(%s)</span>', 'give'),
354
+	));
355 355
 
356 356
 }
357 357
 
358
-add_action( 'init', 'give_register_post_type_statuses' );
358
+add_action('init', 'give_register_post_type_statuses');
359 359
 
360 360
 /**
361 361
  * Updated Messages
@@ -368,27 +368,27 @@  discard block
 block discarded – undo
368 368
  *
369 369
  * @return array $messages New post updated messages
370 370
  */
371
-function give_updated_messages( $messages ) {
371
+function give_updated_messages($messages) {
372 372
 	global $post, $post_ID;
373 373
 
374
-	if ( ! give_is_setting_enabled( give_get_option( 'forms_singular' ) ) ) {
374
+	if ( ! give_is_setting_enabled(give_get_option('forms_singular'))) {
375 375
 
376 376
 		$messages['give_forms'] = array(
377
-			1 => __( 'Form updated.', 'give' ),
378
-			4 => __( 'Form updated.', 'give' ),
379
-			6 => __( 'Form published.', 'give' ),
380
-			7 => __( 'Form saved.', 'give' ),
381
-			8 => __( 'Form submitted.', 'give' ),
377
+			1 => __('Form updated.', 'give'),
378
+			4 => __('Form updated.', 'give'),
379
+			6 => __('Form published.', 'give'),
380
+			7 => __('Form saved.', 'give'),
381
+			8 => __('Form submitted.', 'give'),
382 382
 		);
383 383
 
384 384
 	} else {
385 385
 
386 386
 		$messages['give_forms'] = array(
387
-			1 => sprintf( '%1$s <a href="%2$s">%3$s</a>', __( 'Form updated.', 'give' ), get_permalink( $post_ID ), __( 'View Form', 'give' ) ),
388
-			4 => sprintf( '%1$s <a href="%2$s">%3$s</a>', __( 'Form updated.', 'give' ), get_permalink( $post_ID ), __( 'View Form', 'give' ) ),
389
-			6 => sprintf( '%1$s <a href="%2$s">%3$s</a>', __( 'Form published.', 'give' ), get_permalink( $post_ID ), __( 'View Form', 'give' ) ),
390
-			7 => sprintf( '%1$s <a href="%2$s">%3$s</a>', __( 'Form saved.', 'give' ), get_permalink( $post_ID ), __( 'View Form', 'give' ) ),
391
-			8 => sprintf( '%1$s <a href="%2$s">%3$s</a>', __( 'Form submitted.', 'give' ), get_permalink( $post_ID ), __( 'View Form', 'give' ) ),
387
+			1 => sprintf('%1$s <a href="%2$s">%3$s</a>', __('Form updated.', 'give'), get_permalink($post_ID), __('View Form', 'give')),
388
+			4 => sprintf('%1$s <a href="%2$s">%3$s</a>', __('Form updated.', 'give'), get_permalink($post_ID), __('View Form', 'give')),
389
+			6 => sprintf('%1$s <a href="%2$s">%3$s</a>', __('Form published.', 'give'), get_permalink($post_ID), __('View Form', 'give')),
390
+			7 => sprintf('%1$s <a href="%2$s">%3$s</a>', __('Form saved.', 'give'), get_permalink($post_ID), __('View Form', 'give')),
391
+			8 => sprintf('%1$s <a href="%2$s">%3$s</a>', __('Form submitted.', 'give'), get_permalink($post_ID), __('View Form', 'give')),
392 392
 		);
393 393
 
394 394
 	}
@@ -396,24 +396,24 @@  discard block
 block discarded – undo
396 396
 	return $messages;
397 397
 }
398 398
 
399
-add_filter( 'post_updated_messages', 'give_updated_messages' );
399
+add_filter('post_updated_messages', 'give_updated_messages');
400 400
 
401 401
 /**
402 402
  * Ensure post thumbnail support is turned on
403 403
  */
404 404
 function give_add_thumbnail_support() {
405
-	if ( ! give_is_setting_enabled( give_get_option( 'form_featured_img' ) ) ) {
405
+	if ( ! give_is_setting_enabled(give_get_option('form_featured_img'))) {
406 406
 		return;
407 407
 	}
408 408
 
409
-	if ( ! current_theme_supports( 'post-thumbnails' ) ) {
410
-		add_theme_support( 'post-thumbnails' );
409
+	if ( ! current_theme_supports('post-thumbnails')) {
410
+		add_theme_support('post-thumbnails');
411 411
 	}
412 412
 
413
-	add_post_type_support( 'give_forms', 'thumbnail' );
413
+	add_post_type_support('give_forms', 'thumbnail');
414 414
 }
415 415
 
416
-add_action( 'after_setup_theme', 'give_add_thumbnail_support', 10 );
416
+add_action('after_setup_theme', 'give_add_thumbnail_support', 10);
417 417
 
418 418
 /**
419 419
  * Give Sidebars
@@ -424,21 +424,21 @@  discard block
 block discarded – undo
424 424
 
425 425
 	// Single Give Forms (disabled if single turned off in settings)
426 426
 	if (
427
-		give_is_setting_enabled( give_get_option( 'forms_singular' ) )
428
-		&& give_is_setting_enabled( give_get_option( 'form_sidebar' ) )
427
+		give_is_setting_enabled(give_get_option('forms_singular'))
428
+		&& give_is_setting_enabled(give_get_option('form_sidebar'))
429 429
 	) {
430 430
 
431
-		register_sidebar( apply_filters( 'give_forms_single_sidebar', array(
432
-			'name'          => __( 'Give Single Form Sidebar', 'give' ),
431
+		register_sidebar(apply_filters('give_forms_single_sidebar', array(
432
+			'name'          => __('Give Single Form Sidebar', 'give'),
433 433
 			'id'            => 'give-forms-sidebar',
434
-			'description'   => __( 'Widgets in this area will be shown on the single Give forms aside area. This sidebar will not display for embedded forms.', 'give' ),
434
+			'description'   => __('Widgets in this area will be shown on the single Give forms aside area. This sidebar will not display for embedded forms.', 'give'),
435 435
 			'before_widget' => '<div id="%1$s" class="widget %2$s">',
436 436
 			'after_widget'  => '</div>',
437 437
 			'before_title'  => '<h3 class="widgettitle widget-title">',
438 438
 			'after_title'   => '</h3>',
439
-		) ) );
439
+		)));
440 440
 
441 441
 	}
442 442
 }
443 443
 
444
-add_action( 'widgets_init', 'give_widgets_init', 999 );
444
+add_action('widgets_init', 'give_widgets_init', 999);
Please login to merge, or discard this patch.
includes/admin/donors/donors.php 1 patch
Spacing   +164 added lines, -164 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
  */
11 11
 
12 12
 // Exit if accessed directly.
13
-if ( ! defined( 'ABSPATH' ) ) {
13
+if ( ! defined('ABSPATH')) {
14 14
 	exit;
15 15
 }
16 16
 
@@ -24,9 +24,9 @@  discard block
 block discarded – undo
24 24
  */
25 25
 function give_donors_page() {
26 26
 	$default_views  = give_donor_views();
27
-	$requested_view = isset( $_GET['view'] ) ? sanitize_text_field( $_GET['view'] ) : 'donors';
28
-	if ( array_key_exists( $requested_view, $default_views ) && function_exists( $default_views[ $requested_view ] ) ) {
29
-		give_render_donor_view( $requested_view, $default_views );
27
+	$requested_view = isset($_GET['view']) ? sanitize_text_field($_GET['view']) : 'donors';
28
+	if (array_key_exists($requested_view, $default_views) && function_exists($default_views[$requested_view])) {
29
+		give_render_donor_view($requested_view, $default_views);
30 30
 	} else {
31 31
 		give_donors_list();
32 32
 	}
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
 
43 43
 	$views = array();
44 44
 
45
-	return apply_filters( 'give_donor_views', $views );
45
+	return apply_filters('give_donor_views', $views);
46 46
 
47 47
 }
48 48
 
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
 
57 57
 	$tabs = array();
58 58
 
59
-	return apply_filters( 'give_donor_tabs', $tabs );
59
+	return apply_filters('give_donor_tabs', $tabs);
60 60
 
61 61
 }
62 62
 
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
  * @return void
68 68
  */
69 69
 function give_donors_list() {
70
-	include dirname( __FILE__ ) . '/class-donor-table.php';
70
+	include dirname(__FILE__).'/class-donor-table.php';
71 71
 
72 72
 	$donors_table = new Give_Donor_List_Table();
73 73
 	$donors_table->prepare_items();
@@ -80,11 +80,11 @@  discard block
 block discarded – undo
80 80
 		 *
81 81
 		 * @since 1.0
82 82
 		 */
83
-		do_action( 'give_donors_table_top' );
83
+		do_action('give_donors_table_top');
84 84
 		?>
85
-		<form id="give-donors-filter" method="get" action="<?php echo admin_url( 'edit.php?post_type=give_forms&page=give-donors' ); ?>">
85
+		<form id="give-donors-filter" method="get" action="<?php echo admin_url('edit.php?post_type=give_forms&page=give-donors'); ?>">
86 86
 			<?php
87
-			$donors_table->search_box( esc_html__( 'Search Donors', 'give' ), 'give-donors' );
87
+			$donors_table->search_box(esc_html__('Search Donors', 'give'), 'give-donors');
88 88
 			$donors_table->display();
89 89
 			?>
90 90
 			<input type="hidden" name="post_type" value="give_forms" />
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
 		 *
98 98
 		 * @since 1.0
99 99
 		 */
100
-		do_action( 'give_donors_table_bottom' );
100
+		do_action('give_donors_table_bottom');
101 101
 		?>
102 102
 	</div>
103 103
 	<?php
@@ -113,27 +113,27 @@  discard block
 block discarded – undo
113 113
  *
114 114
  * @return void
115 115
  */
116
-function give_render_donor_view( $view, $callbacks ) {
116
+function give_render_donor_view($view, $callbacks) {
117 117
 
118 118
 	$render = true;
119 119
 
120
-	$donor_view_role = apply_filters( 'give_view_donors_role', 'view_give_reports' );
120
+	$donor_view_role = apply_filters('give_view_donors_role', 'view_give_reports');
121 121
 
122
-	if ( ! current_user_can( $donor_view_role ) ) {
123
-		give_set_error( 'give-no-access', __( 'You are not permitted to view this data.', 'give' ) );
122
+	if ( ! current_user_can($donor_view_role)) {
123
+		give_set_error('give-no-access', __('You are not permitted to view this data.', 'give'));
124 124
 		$render = false;
125 125
 	}
126 126
 
127
-	if ( ! isset( $_GET['id'] ) || ! is_numeric( $_GET['id'] ) ) {
128
-		give_set_error( 'give-invalid_donor', __( 'Invalid Donor ID.', 'give' ) );
127
+	if ( ! isset($_GET['id']) || ! is_numeric($_GET['id'])) {
128
+		give_set_error('give-invalid_donor', __('Invalid Donor ID.', 'give'));
129 129
 		$render = false;
130 130
 	}
131 131
 
132 132
 	$donor_id = (int) $_GET['id'];
133
-	$donor    = new Give_Donor( $donor_id );
133
+	$donor    = new Give_Donor($donor_id);
134 134
 
135
-	if ( empty( $donor->id ) ) {
136
-		give_set_error( 'give-invalid_donor', __( 'Invalid Donor ID.', 'give' ) );
135
+	if (empty($donor->id)) {
136
+		give_set_error('give-invalid_donor', __('Invalid Donor ID.', 'give'));
137 137
 		$render = false;
138 138
 	}
139 139
 
@@ -142,34 +142,34 @@  discard block
 block discarded – undo
142 142
 
143 143
 	<div class='wrap'>
144 144
 
145
-		<?php if ( give_get_errors() ) : ?>
145
+		<?php if (give_get_errors()) : ?>
146 146
 			<div class="error settings-error">
147
-				<?php Give()->notices->render_frontend_notices( 0 ); ?>
147
+				<?php Give()->notices->render_frontend_notices(0); ?>
148 148
 			</div>
149 149
 		<?php endif; ?>
150 150
 
151
-		<h1 class="screen-reader-text"><?php esc_html_e( 'Donor', 'give' ); ?></h1>
151
+		<h1 class="screen-reader-text"><?php esc_html_e('Donor', 'give'); ?></h1>
152 152
 
153
-		<?php if ( $donor && $render ) : ?>
153
+		<?php if ($donor && $render) : ?>
154 154
 
155 155
 			<h2 class="nav-tab-wrapper">
156 156
 			<?php
157
-			foreach ( $donor_tabs as $key => $tab ) :
157
+			foreach ($donor_tabs as $key => $tab) :
158 158
 				$active = $key === $view ? true : false;
159 159
 				$class = $active ? 'nav-tab nav-tab-active' : 'nav-tab';
160 160
 				printf(
161
-					'<a href="%1$s" class="%2$s"><span class="dashicons %3$s"></span>%4$s</a>' . "\n",
162
-					esc_url( admin_url( 'edit.php?post_type=give_forms&page=give-donors&view=' . $key . '&id=' . $donor->id ) ),
163
-					esc_attr( $class ),
164
-					sanitize_html_class( $tab['dashicon'] ),
165
-					esc_html( $tab['title'] )
161
+					'<a href="%1$s" class="%2$s"><span class="dashicons %3$s"></span>%4$s</a>'."\n",
162
+					esc_url(admin_url('edit.php?post_type=give_forms&page=give-donors&view='.$key.'&id='.$donor->id)),
163
+					esc_attr($class),
164
+					sanitize_html_class($tab['dashicon']),
165
+					esc_html($tab['title'])
166 166
 				);
167 167
 			endforeach;
168 168
 			?>
169 169
 			</h2>
170 170
 
171 171
 			<div id="give-donor-card-wrapper">
172
-				<?php $callbacks[ $view ]( $donor ) ?>
172
+				<?php $callbacks[$view]($donor) ?>
173 173
 			</div>
174 174
 
175 175
 		<?php endif; ?>
@@ -189,9 +189,9 @@  discard block
 block discarded – undo
189 189
  *
190 190
  * @return void
191 191
  */
192
-function give_donor_view( $donor ) {
192
+function give_donor_view($donor) {
193 193
 
194
-	$donor_edit_role = apply_filters( 'give_edit_donors_role', 'edit_give_payments' );
194
+	$donor_edit_role = apply_filters('give_edit_donors_role', 'edit_give_payments');
195 195
 
196 196
 	/**
197 197
 	 * Fires in donor profile screen, above the donor card.
@@ -200,32 +200,32 @@  discard block
 block discarded – undo
200 200
 	 *
201 201
 	 * @param object $donor The donor object being displayed.
202 202
 	 */
203
-	do_action( 'give_donor_card_top', $donor );
203
+	do_action('give_donor_card_top', $donor);
204 204
 	?>
205 205
 
206 206
 	<div id="donor-summary" class="info-wrapper donor-section postbox">
207 207
 
208
-		<form id="edit-donor-info" method="post" action="<?php echo admin_url( 'edit.php?post_type=give_forms&page=give-donors&view=overview&id=' . $donor->id ); ?>">
208
+		<form id="edit-donor-info" method="post" action="<?php echo admin_url('edit.php?post_type=give_forms&page=give-donors&view=overview&id='.$donor->id); ?>">
209 209
 
210 210
 			<div class="donor-info">
211 211
 
212 212
 				<div class="donor-bio-header clearfix">
213 213
 
214 214
 					<div class="avatar-wrap left" id="donor-avatar">
215
-						<?php echo get_avatar( $donor->email ); ?>
215
+						<?php echo get_avatar($donor->email); ?>
216 216
 					</div>
217 217
 
218 218
 					<div id="donor-name-wrap" class="left">
219 219
 						<span class="donor-id">#<?php echo $donor->id; ?></span>
220
-						<span class="donor-name info-item edit-item"><input size="15" data-key="name" name="customerinfo[name]" type="text" value="<?php echo esc_attr( $donor->name ); ?>" placeholder="<?php esc_attr_e( 'Donor Name', 'give' ); ?>" /></span>
220
+						<span class="donor-name info-item edit-item"><input size="15" data-key="name" name="customerinfo[name]" type="text" value="<?php echo esc_attr($donor->name); ?>" placeholder="<?php esc_attr_e('Donor Name', 'give'); ?>" /></span>
221 221
 						<span class="donor-name info-item editable"><span data-key="name"><?php echo $donor->name; ?></span></span>
222 222
 					</div>
223 223
 					<p class="donor-since info-item">
224
-						<?php esc_html_e( 'Donor since', 'give' ); ?>
225
-						<?php echo date_i18n( give_date_format(), strtotime( $donor->date_created ) ) ?>
224
+						<?php esc_html_e('Donor since', 'give'); ?>
225
+						<?php echo date_i18n(give_date_format(), strtotime($donor->date_created)) ?>
226 226
 					</p>
227
-					<?php if ( current_user_can( $donor_edit_role ) ) : ?>
228
-						<a href="#" id="edit-donor" class="button info-item editable donor-edit-link"><?php esc_html_e( 'Edit Donor', 'give' ); ?></a>
227
+					<?php if (current_user_can($donor_edit_role)) : ?>
228
+						<a href="#" id="edit-donor" class="button info-item editable donor-edit-link"><?php esc_html_e('Edit Donor', 'give'); ?></a>
229 229
 					<?php endif; ?>
230 230
 				</div>
231 231
 				<!-- /donor-bio-header -->
@@ -235,7 +235,7 @@  discard block
 block discarded – undo
235 235
 					<table class="widefat">
236 236
 						<tbody>
237 237
 						<tr class="alternate">
238
-							<th scope="col"><label for="tablecell"><?php esc_html_e( 'User:', 'give' ); ?></label></th>
238
+							<th scope="col"><label for="tablecell"><?php esc_html_e('User:', 'give'); ?></label></th>
239 239
 							<td>
240 240
 								<span class="donor-user-id info-item edit-item">
241 241
 									<?php
@@ -252,37 +252,37 @@  discard block
 block discarded – undo
252 252
 										'data'  => $data_atts,
253 253
 									);
254 254
 
255
-									if ( ! empty( $user_id ) ) {
256
-										$userdata           = get_userdata( $user_id );
255
+									if ( ! empty($user_id)) {
256
+										$userdata = get_userdata($user_id);
257 257
 										$user_args['selected'] = $user_id;
258 258
 									}
259 259
 
260
-									echo Give()->html->ajax_user_search( $user_args );
260
+									echo Give()->html->ajax_user_search($user_args);
261 261
 									?>
262 262
 								</span>
263 263
 
264 264
 								<span class="donor-user-id info-item editable">
265
-									<?php if ( ! empty( $userdata ) ) { ?>
266
-										<span data-key="user_id">#<?php echo $donor->user_id . ' - ' . $userdata->display_name; ?></span>
265
+									<?php if ( ! empty($userdata)) { ?>
266
+										<span data-key="user_id">#<?php echo $donor->user_id.' - '.$userdata->display_name; ?></span>
267 267
 									<?php } else { ?>
268
-										<span data-key="user_id"><?php esc_html_e( 'None', 'give' ); ?></span>
268
+										<span data-key="user_id"><?php esc_html_e('None', 'give'); ?></span>
269 269
 									<?php } ?>
270
-									<?php if ( current_user_can( $donor_edit_role ) && intval( $donor->user_id ) > 0 ) { ?>
271
-										<span class="disconnect-user"> - <a id="disconnect-donor" href="#disconnect" aria-label="<?php esc_attr_e( 'Disconnects the current user ID from this donor record.', 'give' ); ?>"><?php esc_html_e( 'Disconnect User', 'give' ); ?></a></span>
270
+									<?php if (current_user_can($donor_edit_role) && intval($donor->user_id) > 0) { ?>
271
+										<span class="disconnect-user"> - <a id="disconnect-donor" href="#disconnect" aria-label="<?php esc_attr_e('Disconnects the current user ID from this donor record.', 'give'); ?>"><?php esc_html_e('Disconnect User', 'give'); ?></a></span>
272 272
 									<?php } ?>
273 273
 								</span>
274 274
 							</td>
275 275
 						</tr>
276
-						<?php if ( isset( $donor->user_id ) && $donor->user_id > 0 ) : ?>
276
+						<?php if (isset($donor->user_id) && $donor->user_id > 0) : ?>
277 277
 
278 278
 							<tr>
279
-								<th scope="col"><?php esc_html_e( 'Address:', 'give' ); ?></th>
279
+								<th scope="col"><?php esc_html_e('Address:', 'give'); ?></th>
280 280
 								<td class="row-title">
281 281
 
282 282
 									<div class="donor-address-wrapper">
283 283
 
284 284
 										<?php
285
-										$address  = get_user_meta( $donor->user_id, '_give_user_address', true );
285
+										$address  = get_user_meta($donor->user_id, '_give_user_address', true);
286 286
 										$defaults = array(
287 287
 											'line1'   => '',
288 288
 											'line2'   => '',
@@ -292,10 +292,10 @@  discard block
 block discarded – undo
292 292
 											'zip'     => '',
293 293
 										);
294 294
 
295
-										$address = wp_parse_args( $address, $defaults );
295
+										$address = wp_parse_args($address, $defaults);
296 296
 										?>
297 297
 
298
-										<?php if ( ! empty( $address ) ) { ?>
298
+										<?php if ( ! empty($address)) { ?>
299 299
 											<span class="donor-address info-item editable">
300 300
 												<span class="info-item" data-key="line1"><?php echo $address['line1']; ?></span>
301 301
 												<span class="info-item" data-key="line2"><?php echo $address['line2']; ?></span>
@@ -306,43 +306,43 @@  discard block
 block discarded – undo
306 306
 											</span>
307 307
 										<?php } ?>
308 308
 										<span class="donor-address info-item edit-item">
309
-											<input class="info-item" type="text" data-key="line1" name="customerinfo[line1]" placeholder="<?php esc_attr_e( 'Address 1', 'give' ); ?>" value="<?php echo $address['line1']; ?>" />
310
-											<input class="info-item" type="text" data-key="line2" name="customerinfo[line2]" placeholder="<?php esc_attr_e( 'Address 2', 'give' ); ?>" value="<?php echo $address['line2']; ?>" />
311
-											<input class="info-item" type="text" data-key="city" name="customerinfo[city]" placeholder="<?php esc_attr_e( 'City', 'give' ); ?>" value="<?php echo $address['city']; ?>" />
309
+											<input class="info-item" type="text" data-key="line1" name="customerinfo[line1]" placeholder="<?php esc_attr_e('Address 1', 'give'); ?>" value="<?php echo $address['line1']; ?>" />
310
+											<input class="info-item" type="text" data-key="line2" name="customerinfo[line2]" placeholder="<?php esc_attr_e('Address 2', 'give'); ?>" value="<?php echo $address['line2']; ?>" />
311
+											<input class="info-item" type="text" data-key="city" name="customerinfo[city]" placeholder="<?php esc_attr_e('City', 'give'); ?>" value="<?php echo $address['city']; ?>" />
312 312
 											<select data-key="country" name="customerinfo[country]" id="billing_country" class="billing_country give-select edit-item">
313 313
 												<?php
314 314
 
315 315
 												$selected_country = $address['country'];
316 316
 
317 317
 												$countries = give_get_country_list();
318
-												foreach ( $countries as $country_code => $country ) {
319
-													echo '<option value="' . esc_attr( $country_code ) . '"' . selected( $country_code, $selected_country, false ) . '>' . $country . '</option>';
318
+												foreach ($countries as $country_code => $country) {
319
+													echo '<option value="'.esc_attr($country_code).'"'.selected($country_code, $selected_country, false).'>'.$country.'</option>';
320 320
 												}
321 321
 												?>
322 322
 											</select>
323 323
 											<?php
324 324
 											$selected_state = give_get_state();
325
-											$states         = give_get_states( $selected_country );
325
+											$states         = give_get_states($selected_country);
326 326
 
327
-											$selected_state = isset( $address['state'] ) ? $address['state'] : $selected_state;
327
+											$selected_state = isset($address['state']) ? $address['state'] : $selected_state;
328 328
 
329
-											if ( ! empty( $states ) ) {
329
+											if ( ! empty($states)) {
330 330
 												?>
331 331
 												<select data-key="state" name="customerinfo[state]" id="card_state" class="card_state give-select info-item">
332 332
 													<?php
333
-													foreach ( $states as $state_code => $state ) {
334
-														echo '<option value="' . $state_code . '"' . selected( $state_code, $selected_state, false ) . '>' . $state . '</option>';
333
+													foreach ($states as $state_code => $state) {
334
+														echo '<option value="'.$state_code.'"'.selected($state_code, $selected_state, false).'>'.$state.'</option>';
335 335
 													}
336 336
 													?>
337 337
 												</select>
338 338
 												<?php
339 339
 											} else {
340 340
 												?>
341
-												<input type="text" size="6" data-key="state" name="customerinfo[state]" id="card_state" class="card_state give-input info-item" placeholder="<?php esc_attr_e( 'State / Province / County', 'give' ); ?>" />
341
+												<input type="text" size="6" data-key="state" name="customerinfo[state]" id="card_state" class="card_state give-input info-item" placeholder="<?php esc_attr_e('State / Province / County', 'give'); ?>" />
342 342
 												<?php
343 343
 											}
344 344
 											?>
345
-											<input class="info-item" type="text" data-key="zip" name="customerinfo[zip]" placeholder="<?php esc_attr_e( 'Zip / Postal Code', 'give' ); ?>" value="<?php echo $address['zip']; ?>" />
345
+											<input class="info-item" type="text" data-key="zip" name="customerinfo[zip]" placeholder="<?php esc_attr_e('Zip / Postal Code', 'give'); ?>" value="<?php echo $address['zip']; ?>" />
346 346
 										</span>
347 347
 
348 348
 									</div>
@@ -358,10 +358,10 @@  discard block
 block discarded – undo
358 358
 
359 359
 			<span id="donor-edit-actions" class="edit-item">
360 360
 				<input type="hidden" data-key="id" name="customerinfo[id]" value="<?php echo $donor->id; ?>" />
361
-				<?php wp_nonce_field( 'edit-donor', '_wpnonce', false, true ); ?>
361
+				<?php wp_nonce_field('edit-donor', '_wpnonce', false, true); ?>
362 362
 				<input type="hidden" name="give_action" value="edit-donor" />
363
-				<input type="submit" id="give-edit-donor-save" class="button-secondary" value="<?php esc_attr_e( 'Update Donor', 'give' ); ?>" />
364
-				<a id="give-edit-donor-cancel" href="" class="delete"><?php esc_html_e( 'Cancel', 'give' ); ?></a>
363
+				<input type="submit" id="give-edit-donor-save" class="button-secondary" value="<?php esc_attr_e('Update Donor', 'give'); ?>" />
364
+				<a id="give-edit-donor-cancel" href="" class="delete"><?php esc_html_e('Cancel', 'give'); ?></a>
365 365
 			</span>
366 366
 
367 367
 		</form>
@@ -376,24 +376,24 @@  discard block
 block discarded – undo
376 376
 	 *
377 377
 	 * @param object $donor The donor object being displayed.
378 378
 	 */
379
-	do_action( 'give_donor_before_stats', $donor );
379
+	do_action('give_donor_before_stats', $donor);
380 380
 	?>
381 381
 
382 382
 	<div id="donor-stats-wrapper" class="donor-section postbox clear">
383 383
 		<ul>
384 384
 			<li>
385
-				<a href="<?php echo admin_url( 'edit.php?post_type=give_forms&page=give-payment-history&donor=' . absint( $donor->id ) ); ?>">
385
+				<a href="<?php echo admin_url('edit.php?post_type=give_forms&page=give-payment-history&donor='.absint($donor->id)); ?>">
386 386
 					<span class="dashicons dashicons-heart"></span>
387 387
 					<?php
388 388
 					// Completed Donations
389
-					$completed_donations_text = sprintf( _n( '%d Completed Donation', '%d Completed Donations', $donor->purchase_count, 'give' ), $donor->purchase_count );
390
-					echo apply_filters( 'give_donor_completed_donations', $completed_donations_text, $donor );
389
+					$completed_donations_text = sprintf(_n('%d Completed Donation', '%d Completed Donations', $donor->purchase_count, 'give'), $donor->purchase_count);
390
+					echo apply_filters('give_donor_completed_donations', $completed_donations_text, $donor);
391 391
 					?>
392 392
 				</a>
393 393
 			</li>
394 394
 			<li>
395 395
 				<span class="dashicons dashicons-chart-area"></span>
396
-				<?php echo give_currency_filter( give_format_amount( $donor->purchase_value, array( 'sanitize' => false ) ) ); ?> <?php esc_html_e( 'Lifetime Donations', 'give' ); ?>
396
+				<?php echo give_currency_filter(give_format_amount($donor->purchase_value, array('sanitize' => false))); ?> <?php esc_html_e('Lifetime Donations', 'give'); ?>
397 397
 			</li>
398 398
 			<?php
399 399
 			/**
@@ -405,7 +405,7 @@  discard block
 block discarded – undo
405 405
 			 *
406 406
 			 * @param object $donor The donor object being displayed.
407 407
 			 */
408
-			do_action( 'give_donor_stats_list', $donor );
408
+			do_action('give_donor_stats_list', $donor);
409 409
 			?>
410 410
 		</ul>
411 411
 	</div>
@@ -418,7 +418,7 @@  discard block
 block discarded – undo
418 418
 	 *
419 419
 	 * @param object $donor The donor object being displayed.
420 420
 	 */
421
-	do_action( 'give_donor_before_tables_wrapper', $donor );
421
+	do_action('give_donor_before_tables_wrapper', $donor);
422 422
 	?>
423 423
 
424 424
 	<div id="donor-tables-wrapper" class="donor-section">
@@ -431,46 +431,46 @@  discard block
 block discarded – undo
431 431
 		 *
432 432
 		 * @param object $donor The donor object being displayed.
433 433
 		 */
434
-		do_action( 'give_donor_before_tables', $donor );
434
+		do_action('give_donor_before_tables', $donor);
435 435
 		?>
436 436
 
437
-		<h3><?php _e( 'Donor Emails', 'give' ); ?></h3>
437
+		<h3><?php _e('Donor Emails', 'give'); ?></h3>
438 438
 
439 439
 		<table class="wp-list-table widefat striped emails">
440 440
 			<thead>
441 441
 				<tr>
442
-					<th><?php _e( 'Email', 'give' ); ?></th>
443
-					<th><?php _e( 'Actions', 'give' ); ?></th>
442
+					<th><?php _e('Email', 'give'); ?></th>
443
+					<th><?php _e('Actions', 'give'); ?></th>
444 444
 				</tr>
445 445
 			</thead>
446 446
 
447 447
 			<tbody>
448
-				<?php if ( ! empty( $donor->emails ) ) { ?>
448
+				<?php if ( ! empty($donor->emails)) { ?>
449 449
 
450
-					<?php foreach ( $donor->emails as $key => $email ) : ?>
450
+					<?php foreach ($donor->emails as $key => $email) : ?>
451 451
 						<tr data-key="<?php echo $key; ?>">
452 452
 							<td>
453 453
 								<?php echo $email; ?>
454
-								<?php if ( 'primary' === $key ) : ?>
454
+								<?php if ('primary' === $key) : ?>
455 455
 									<span class="dashicons dashicons-star-filled primary-email-icon"></span>
456 456
 								<?php endif; ?>
457 457
 							</td>
458 458
 							<td>
459
-								<?php if ( 'primary' !== $key ) : ?>
459
+								<?php if ('primary' !== $key) : ?>
460 460
 									<?php
461
-									$base_url    = admin_url( 'edit.php?post_type=give_forms&page=give-donors&view=overview&id=' . $donor->id );
462
-									$promote_url = wp_nonce_url( add_query_arg( array(
463
-										'email' => rawurlencode( $email ),
461
+									$base_url    = admin_url('edit.php?post_type=give_forms&page=give-donors&view=overview&id='.$donor->id);
462
+									$promote_url = wp_nonce_url(add_query_arg(array(
463
+										'email' => rawurlencode($email),
464 464
 										'give_action' => 'set_donor_primary_email',
465
-									), $base_url ), 'give-set-donor-primary-email' );
466
-									$remove_url  = wp_nonce_url( add_query_arg( array(
467
-										'email' => rawurlencode( $email ),
465
+									), $base_url), 'give-set-donor-primary-email');
466
+									$remove_url = wp_nonce_url(add_query_arg(array(
467
+										'email' => rawurlencode($email),
468 468
 										'give_action' => 'remove_donor_email',
469
-									), $base_url ), 'give-remove-donor-email' );
469
+									), $base_url), 'give-remove-donor-email');
470 470
 									?>
471
-									<a href="<?php echo $promote_url; ?>"><?php _e( 'Make Primary', 'give' ); ?></a>
471
+									<a href="<?php echo $promote_url; ?>"><?php _e('Make Primary', 'give'); ?></a>
472 472
 									&nbsp;|&nbsp;
473
-									<a href="<?php echo $remove_url; ?>" class="delete"><?php _e( 'Remove', 'give' ); ?></a>
473
+									<a href="<?php echo $remove_url; ?>" class="delete"><?php _e('Remove', 'give'); ?></a>
474 474
 								<?php endif; ?>
475 475
 							</td>
476 476
 						</tr>
@@ -480,59 +480,59 @@  discard block
 block discarded – undo
480 480
 						<td colspan="2" class="add-donor-email-td">
481 481
 							<div class="add-donor-email-wrapper">
482 482
 								<input type="hidden" name="donor-id" value="<?php echo $donor->id; ?>" />
483
-								<?php wp_nonce_field( 'give_add_donor_email', 'add_email_nonce', false, true ); ?>
484
-								<input type="email" name="additional-email" value="" placeholder="<?php _e( 'Email Address', 'give' ); ?>" />&nbsp;
485
-								<input type="checkbox" name="make-additional-primary" value="1" id="make-additional-primary" />&nbsp;<label for="make-additional-primary"><?php _e( 'Make Primary', 'give' ); ?></label>
486
-								<button class="button-secondary give-add-donor-email" id="add-donor-email"><?php _e( 'Add Email', 'give' ); ?></button>
483
+								<?php wp_nonce_field('give_add_donor_email', 'add_email_nonce', false, true); ?>
484
+								<input type="email" name="additional-email" value="" placeholder="<?php _e('Email Address', 'give'); ?>" />&nbsp;
485
+								<input type="checkbox" name="make-additional-primary" value="1" id="make-additional-primary" />&nbsp;<label for="make-additional-primary"><?php _e('Make Primary', 'give'); ?></label>
486
+								<button class="button-secondary give-add-donor-email" id="add-donor-email"><?php _e('Add Email', 'give'); ?></button>
487 487
 								<span class="spinner"></span>
488 488
 							</div>
489 489
 							<div class="notice-wrap"></div>
490 490
 						</td>
491 491
 					</tr>
492 492
 				<?php } else { ?>
493
-					<tr><td colspan="2"><?php _e( 'No Emails Found', 'give' ); ?></td></tr>
493
+					<tr><td colspan="2"><?php _e('No Emails Found', 'give'); ?></td></tr>
494 494
 				<?php }// End if().
495 495
 	?>
496 496
 			</tbody>
497 497
 		</table>
498 498
 
499
-		<h3><?php esc_html_e( 'Recent Donations', 'give' ); ?></h3>
499
+		<h3><?php esc_html_e('Recent Donations', 'give'); ?></h3>
500 500
 		<?php
501
-		$payment_ids = explode( ',', $donor->payment_ids );
502
-		$payments    = give_get_payments( array(
501
+		$payment_ids = explode(',', $donor->payment_ids);
502
+		$payments    = give_get_payments(array(
503 503
 			'post__in' => $payment_ids,
504
-		) );
505
-		$payments    = array_slice( $payments, 0, 10 );
504
+		));
505
+		$payments    = array_slice($payments, 0, 10);
506 506
 		?>
507 507
 		<table class="wp-list-table widefat striped payments">
508 508
 			<thead>
509 509
 			<tr>
510
-				<th scope="col"><?php esc_html_e( 'ID', 'give' ); ?></th>
511
-				<th scope="col"><?php esc_html_e( 'Amount', 'give' ); ?></th>
512
-				<th scope="col"><?php esc_html_e( 'Date', 'give' ); ?></th>
513
-				<th scope="col"><?php esc_html_e( 'Status', 'give' ); ?></th>
514
-				<th scope="col"><?php esc_html_e( 'Actions', 'give' ); ?></th>
510
+				<th scope="col"><?php esc_html_e('ID', 'give'); ?></th>
511
+				<th scope="col"><?php esc_html_e('Amount', 'give'); ?></th>
512
+				<th scope="col"><?php esc_html_e('Date', 'give'); ?></th>
513
+				<th scope="col"><?php esc_html_e('Status', 'give'); ?></th>
514
+				<th scope="col"><?php esc_html_e('Actions', 'give'); ?></th>
515 515
 			</tr>
516 516
 			</thead>
517 517
 			<tbody>
518
-			<?php if ( ! empty( $payments ) ) { ?>
519
-				<?php foreach ( $payments as $payment ) : ?>
518
+			<?php if ( ! empty($payments)) { ?>
519
+				<?php foreach ($payments as $payment) : ?>
520 520
 					<tr>
521 521
 						<td><?php echo $payment->ID; ?></td>
522
-						<td><?php echo give_payment_amount( $payment->ID ); ?></td>
523
-						<td><?php echo date_i18n( give_date_format(), strtotime( $payment->post_date ) ); ?></td>
524
-						<td><?php echo give_get_payment_status( $payment, true ); ?></td>
522
+						<td><?php echo give_payment_amount($payment->ID); ?></td>
523
+						<td><?php echo date_i18n(give_date_format(), strtotime($payment->post_date)); ?></td>
524
+						<td><?php echo give_get_payment_status($payment, true); ?></td>
525 525
 						<td>
526 526
 							<?php
527 527
 							printf(
528 528
 								'<a href="%1$s" aria-label="%2$s">%3$s</a>',
529
-								admin_url( 'edit.php?post_type=give_forms&page=give-payment-history&view=view-payment-details&id=' . $payment->ID ),
529
+								admin_url('edit.php?post_type=give_forms&page=give-payment-history&view=view-payment-details&id='.$payment->ID),
530 530
 								sprintf(
531 531
 									/* translators: %s: Donation ID */
532
-									esc_attr__( 'View Donation %s.', 'give' ),
532
+									esc_attr__('View Donation %s.', 'give'),
533 533
 									$payment->ID
534 534
 								),
535
-								esc_html__( 'View Donation', 'give' )
535
+								esc_html__('View Donation', 'give')
536 536
 							);
537 537
 							?>
538 538
 
@@ -547,47 +547,47 @@  discard block
 block discarded – undo
547 547
 							 * @param object $donor The donor object being displayed.
548 548
 							 * @param object $payment  The payment object being displayed.
549 549
 							 */
550
-							do_action( 'give_donor_recent_purchases_actions', $donor, $payment );
550
+							do_action('give_donor_recent_purchases_actions', $donor, $payment);
551 551
 							?>
552 552
 						</td>
553 553
 					</tr>
554 554
 				<?php endforeach; ?>
555 555
 			<?php } else { ?>
556 556
 				<tr>
557
-					<td colspan="5"><?php esc_html_e( 'No donations found.', 'give' ); ?></td>
557
+					<td colspan="5"><?php esc_html_e('No donations found.', 'give'); ?></td>
558 558
 				</tr>
559 559
 			<?php }// End if().
560 560
 	?>
561 561
 			</tbody>
562 562
 		</table>
563 563
 
564
-		<h3><?php esc_html_e( 'Completed Forms', 'give' ); ?></h3>
564
+		<h3><?php esc_html_e('Completed Forms', 'give'); ?></h3>
565 565
 		<?php
566
-		$donations = give_get_users_completed_donations( $donor->email );
566
+		$donations = give_get_users_completed_donations($donor->email);
567 567
 		?>
568 568
 		<table class="wp-list-table widefat striped donations">
569 569
 			<thead>
570 570
 			<tr>
571
-				<th scope="col"><?php esc_html_e( 'Form', 'give' ); ?></th>
572
-				<th scope="col" width="120px"><?php esc_html_e( 'Actions', 'give' ); ?></th>
571
+				<th scope="col"><?php esc_html_e('Form', 'give'); ?></th>
572
+				<th scope="col" width="120px"><?php esc_html_e('Actions', 'give'); ?></th>
573 573
 			</tr>
574 574
 			</thead>
575 575
 			<tbody>
576
-			<?php if ( ! empty( $donations ) ) { ?>
577
-				<?php foreach ( $donations as $donation ) : ?>
576
+			<?php if ( ! empty($donations)) { ?>
577
+				<?php foreach ($donations as $donation) : ?>
578 578
 					<tr>
579 579
 						<td><?php echo $donation->post_title; ?></td>
580 580
 						<td>
581 581
 							<?php
582 582
 							printf(
583 583
 								'<a href="%1$s" aria-label="%2$s">%3$s</a>',
584
-								esc_url( admin_url( 'post.php?action=edit&post=' . $donation->ID ) ),
584
+								esc_url(admin_url('post.php?action=edit&post='.$donation->ID)),
585 585
 								sprintf(
586 586
 									/* translators: %s: form name */
587
-									esc_attr__( 'View Form %s.', 'give' ),
587
+									esc_attr__('View Form %s.', 'give'),
588 588
 									$donation->post_title
589 589
 								),
590
-								esc_html__( 'View Form', 'give' )
590
+								esc_html__('View Form', 'give')
591 591
 							);
592 592
 							?>
593 593
 						</td>
@@ -595,7 +595,7 @@  discard block
 block discarded – undo
595 595
 				<?php endforeach; ?>
596 596
 			<?php } else { ?>
597 597
 				<tr>
598
-					<td colspan="2"><?php esc_html_e( 'No completed donations found.', 'give' ); ?></td>
598
+					<td colspan="2"><?php esc_html_e('No completed donations found.', 'give'); ?></td>
599 599
 				</tr>
600 600
 			<?php } ?>
601 601
 			</tbody>
@@ -609,7 +609,7 @@  discard block
 block discarded – undo
609 609
 		 *
610 610
 		 * @param object $donor The donor object being displayed.
611 611
 		 */
612
-		do_action( 'give_donor_after_tables', $donor );
612
+		do_action('give_donor_after_tables', $donor);
613 613
 		?>
614 614
 
615 615
 	</div>
@@ -622,7 +622,7 @@  discard block
 block discarded – undo
622 622
 	 *
623 623
 	 * @param object $donor The donor object being displayed.
624 624
 	 */
625
-	do_action( 'give_donor_card_bottom', $donor );
625
+	do_action('give_donor_card_bottom', $donor);
626 626
 
627 627
 }
628 628
 
@@ -635,30 +635,30 @@  discard block
 block discarded – undo
635 635
  *
636 636
  * @return void
637 637
  */
638
-function give_donor_notes_view( $donor ) {
638
+function give_donor_notes_view($donor) {
639 639
 
640
-	$paged          = isset( $_GET['paged'] ) && is_numeric( $_GET['paged'] ) ? $_GET['paged'] : 1;
641
-	$paged          = absint( $paged );
640
+	$paged          = isset($_GET['paged']) && is_numeric($_GET['paged']) ? $_GET['paged'] : 1;
641
+	$paged          = absint($paged);
642 642
 	$note_count     = $donor->get_notes_count();
643
-	$per_page       = apply_filters( 'give_donor_notes_per_page', 20 );
644
-	$total_pages    = ceil( $note_count / $per_page );
645
-	$donor_notes = $donor->get_notes( $per_page, $paged );
643
+	$per_page       = apply_filters('give_donor_notes_per_page', 20);
644
+	$total_pages    = ceil($note_count / $per_page);
645
+	$donor_notes = $donor->get_notes($per_page, $paged);
646 646
 	?>
647 647
 
648 648
 	<div id="donor-notes-wrapper">
649 649
 		<div class="donor-notes-header">
650
-			<?php echo get_avatar( $donor->email, 30 ); ?> <span><?php echo $donor->name; ?></span>
650
+			<?php echo get_avatar($donor->email, 30); ?> <span><?php echo $donor->name; ?></span>
651 651
 		</div>
652
-		<h3><?php esc_html_e( 'Notes', 'give' ); ?></h3>
652
+		<h3><?php esc_html_e('Notes', 'give'); ?></h3>
653 653
 
654
-		<?php if ( 1 == $paged ) : ?>
654
+		<?php if (1 == $paged) : ?>
655 655
 			<div style="display: block; margin-bottom: 55px;">
656
-				<form id="give-add-donor-note" method="post" action="<?php echo admin_url( 'edit.php?post_type=give_forms&page=give-donors&view=notes&id=' . $donor->id ); ?>">
656
+				<form id="give-add-donor-note" method="post" action="<?php echo admin_url('edit.php?post_type=give_forms&page=give-donors&view=notes&id='.$donor->id); ?>">
657 657
 					<textarea id="donor-note" name="donor_note" class="donor-note-input" rows="10"></textarea>
658 658
 					<br />
659 659
 					<input type="hidden" id="donor-id" name="customer_id" value="<?php echo $donor->id; ?>" />
660 660
 					<input type="hidden" name="give_action" value="add-donor-note" />
661
-					<?php wp_nonce_field( 'add-donor-note', 'add_donor_note_nonce', true, true ); ?>
661
+					<?php wp_nonce_field('add-donor-note', 'add_donor_note_nonce', true, true); ?>
662 662
 					<input id="add-donor-note" class="right button-primary" type="submit" value="Add Note" />
663 663
 				</form>
664 664
 			</div>
@@ -673,26 +673,26 @@  discard block
 block discarded – undo
673 673
 			'show_all' => true,
674 674
 		);
675 675
 
676
-		echo paginate_links( $pagination_args );
676
+		echo paginate_links($pagination_args);
677 677
 		?>
678 678
 
679 679
 		<div id="give-donor-notes" class="postbox">
680
-			<?php if ( count( $donor_notes ) > 0 ) { ?>
681
-				<?php foreach ( $donor_notes as $key => $note ) : ?>
680
+			<?php if (count($donor_notes) > 0) { ?>
681
+				<?php foreach ($donor_notes as $key => $note) : ?>
682 682
 					<div class="donor-note-wrapper dashboard-comment-wrap comment-item">
683 683
 					<span class="note-content-wrap">
684
-						<?php echo stripslashes( $note ); ?>
684
+						<?php echo stripslashes($note); ?>
685 685
 					</span>
686 686
 					</div>
687 687
 				<?php endforeach; ?>
688 688
 			<?php } else { ?>
689 689
 				<div class="give-no-donor-notes">
690
-					<?php esc_html_e( 'No donor notes found.', 'give' ); ?>
690
+					<?php esc_html_e('No donor notes found.', 'give'); ?>
691 691
 				</div>
692 692
 			<?php } ?>
693 693
 		</div>
694 694
 
695
-		<?php echo paginate_links( $pagination_args ); ?>
695
+		<?php echo paginate_links($pagination_args); ?>
696 696
 
697 697
 	</div>
698 698
 
@@ -708,9 +708,9 @@  discard block
 block discarded – undo
708 708
  *
709 709
  * @return void
710 710
  */
711
-function give_donor_delete_view( $donor ) {
711
+function give_donor_delete_view($donor) {
712 712
 
713
-	$donor_edit_role = apply_filters( 'give_edit_donors_role', 'edit_give_payments' );
713
+	$donor_edit_role = apply_filters('give_edit_donors_role', 'edit_give_payments');
714 714
 
715 715
 	/**
716 716
 	 * Fires in donor delete screen, above the content.
@@ -719,15 +719,15 @@  discard block
 block discarded – undo
719 719
 	 *
720 720
 	 * @param object $donor The donor object being displayed.
721 721
 	 */
722
-	do_action( 'give_donor_delete_top', $donor );
722
+	do_action('give_donor_delete_top', $donor);
723 723
 	?>
724 724
 
725 725
 	<div class="info-wrapper donor-section">
726 726
 
727
-		<form id="delete-donor" method="post" action="<?php echo admin_url( 'edit.php?post_type=give_forms&page=give-donors&view=delete&id=' . $donor->id ); ?>">
727
+		<form id="delete-donor" method="post" action="<?php echo admin_url('edit.php?post_type=give_forms&page=give-donors&view=delete&id='.$donor->id); ?>">
728 728
 
729 729
 			<div class="donor-notes-header">
730
-				<?php echo get_avatar( $donor->email, 30 ); ?> <span><?php echo $donor->name; ?></span>
730
+				<?php echo get_avatar($donor->email, 30); ?> <span><?php echo $donor->name; ?></span>
731 731
 			</div>
732 732
 
733 733
 
@@ -735,20 +735,20 @@  discard block
 block discarded – undo
735 735
 
736 736
 				<span class="delete-donor-options">
737 737
 					<p>
738
-						<?php echo Give()->html->checkbox( array(
738
+						<?php echo Give()->html->checkbox(array(
739 739
 							'name' => 'give-donor-delete-confirm',
740
-						) ); ?>
741
-						<label for="give-donor-delete-confirm"><?php esc_html_e( 'Are you sure you want to delete this donor?', 'give' ); ?></label>
740
+						)); ?>
741
+						<label for="give-donor-delete-confirm"><?php esc_html_e('Are you sure you want to delete this donor?', 'give'); ?></label>
742 742
 					</p>
743 743
 
744 744
 					<p>
745
-						<?php echo Give()->html->checkbox( array(
745
+						<?php echo Give()->html->checkbox(array(
746 746
 							'name'    => 'give-donor-delete-records',
747 747
 							'options' => array(
748 748
 								'disabled' => true,
749 749
 							),
750
-						) ); ?>
751
-						<label for="give-donor-delete-records"><?php esc_html_e( 'Delete all associated donations and records?', 'give' ); ?></label>
750
+						)); ?>
751
+						<label for="give-donor-delete-records"><?php esc_html_e('Delete all associated donations and records?', 'give'); ?></label>
752 752
 					</p>
753 753
 
754 754
 					<?php
@@ -761,16 +761,16 @@  discard block
 block discarded – undo
761 761
 					 *
762 762
 					 * @param object $donor The donor object being displayed.
763 763
 					 */
764
-					do_action( 'give_donor_delete_inputs', $donor );
764
+					do_action('give_donor_delete_inputs', $donor);
765 765
 					?>
766 766
 				</span>
767 767
 
768 768
 				<span id="donor-edit-actions">
769 769
 					<input type="hidden" name="customer_id" value="<?php echo $donor->id; ?>" />
770
-					<?php wp_nonce_field( 'delete-donor', '_wpnonce', false, true ); ?>
770
+					<?php wp_nonce_field('delete-donor', '_wpnonce', false, true); ?>
771 771
 					<input type="hidden" name="give_action" value="delete-donor" />
772
-					<input type="submit" disabled="disabled" id="give-delete-donor" class="button-primary" value="<?php esc_attr_e( 'Delete Donor', 'give' ); ?>" />
773
-					<a id="give-delete-donor-cancel" href="<?php echo admin_url( 'edit.php?post_type=give_forms&page=give-donors&view=overview&id=' . $donor->id ); ?>" class="delete"><?php esc_html_e( 'Cancel', 'give' ); ?></a>
772
+					<input type="submit" disabled="disabled" id="give-delete-donor" class="button-primary" value="<?php esc_attr_e('Delete Donor', 'give'); ?>" />
773
+					<a id="give-delete-donor-cancel" href="<?php echo admin_url('edit.php?post_type=give_forms&page=give-donors&view=overview&id='.$donor->id); ?>" class="delete"><?php esc_html_e('Cancel', 'give'); ?></a>
774 774
 				</span>
775 775
 
776 776
 			</div>
@@ -786,5 +786,5 @@  discard block
 block discarded – undo
786 786
 	 *
787 787
 	 * @param object $donor The donor object being displayed.
788 788
 	 */
789
-	do_action( 'give_donor_delete_bottom', $donor );
789
+	do_action('give_donor_delete_bottom', $donor);
790 790
 }
Please login to merge, or discard this patch.
templates/shortcode-receipt.php 1 patch
Spacing   +50 added lines, -50 removed lines patch added patch discarded remove patch
@@ -6,25 +6,25 @@  discard block
 block discarded – undo
6 6
 global $give_receipt_args, $payment;
7 7
 
8 8
 // Validation: Ensure $payment var is set.
9
-if ( empty( $payment ) ) {
10
-	$payment = ! empty( $give_receipt_args['id'] ) ? get_post( $give_receipt_args['id'] ) : 0;
9
+if (empty($payment)) {
10
+	$payment = ! empty($give_receipt_args['id']) ? get_post($give_receipt_args['id']) : 0;
11 11
 }
12 12
 
13 13
 // Double-Validation: Check for $payment global.
14
-if ( empty( $payment ) ) {
15
-	Give()->notices->print_frontend_notice( __( 'The specified receipt ID appears to be invalid.', 'give' ) );
14
+if (empty($payment)) {
15
+	Give()->notices->print_frontend_notice(__('The specified receipt ID appears to be invalid.', 'give'));
16 16
 
17 17
 	return;
18 18
 }
19 19
 
20 20
 $donation_id    = $payment->ID;
21
-$form_id        = give_get_payment_meta( $donation_id, '_give_payment_form_id', true );
22
-$meta           = give_get_payment_meta( $donation_id );
23
-$donation       = give_get_payment_form_title( $meta );
24
-$user           = give_get_payment_meta_user_info( $donation_id );
25
-$email          = give_get_payment_user_email( $donation_id );
21
+$form_id        = give_get_payment_meta($donation_id, '_give_payment_form_id', true);
22
+$meta           = give_get_payment_meta($donation_id);
23
+$donation       = give_get_payment_form_title($meta);
24
+$user           = give_get_payment_meta_user_info($donation_id);
25
+$email          = give_get_payment_user_email($donation_id);
26 26
 $status         = $payment->post_status;
27
-$status_label   = give_get_payment_status( $payment, true );
27
+$status_label   = give_get_payment_status($payment, true);
28 28
 
29 29
 /**
30 30
  * Generate Donation Receipt Arguments.
@@ -34,56 +34,56 @@  discard block
 block discarded – undo
34 34
  * @since 1.8.8
35 35
  */
36 36
 $give_receipt_args['donation_receipt']['donor'] = array(
37
-	'name'      => __( 'Donor', 'give' ),
38
-	'value'     => $user['first_name'] . ' ' . $user['last_name'],
37
+	'name'      => __('Donor', 'give'),
38
+	'value'     => $user['first_name'].' '.$user['last_name'],
39 39
 	'display'   => $give_receipt_args['donor'],
40 40
 );
41 41
 
42 42
 $give_receipt_args['donation_receipt']['date'] = array(
43
-	'name'      => __( 'Date', 'give' ),
44
-	'value'     => date_i18n( give_date_format(), strtotime( $meta['date'] ) ),
43
+	'name'      => __('Date', 'give'),
44
+	'value'     => date_i18n(give_date_format(), strtotime($meta['date'])),
45 45
 	'display'   => $give_receipt_args['date'],
46 46
 );
47 47
 
48 48
 $give_receipt_args['donation_receipt']['total_donation'] = array(
49
-	'name'      => __( 'Total Donation', 'give' ),
50
-	'value'     => give_payment_amount( $donation_id ),
49
+	'name'      => __('Total Donation', 'give'),
50
+	'value'     => give_payment_amount($donation_id),
51 51
 	'display'   => true,
52 52
 );
53 53
 
54 54
 $give_receipt_args['donation_receipt']['donation'] = array(
55
-	'name'      => __( 'Donation', 'give' ),
55
+	'name'      => __('Donation', 'give'),
56 56
 	'value'     => $donation,
57 57
 	'display'   => true,
58 58
 );
59 59
 
60 60
 $give_receipt_args['donation_receipt']['donation_status'] = array(
61
-	'name'      => __( 'Donation Status', 'give' ),
62
-	'value'     => esc_attr( $status ),
61
+	'name'      => __('Donation Status', 'give'),
62
+	'value'     => esc_attr($status),
63 63
 	'display'   => $give_receipt_args['payment_status'],
64 64
 );
65 65
 
66 66
 $give_receipt_args['donation_receipt']['donation_id'] = array(
67
-	'name'      => __( 'Donation ID', 'give' ),
67
+	'name'      => __('Donation ID', 'give'),
68 68
 	'value'     => $donation_id,
69
-	'display'   => ($give_receipt_args['payment_id'])?true:false,
69
+	'display'   => ($give_receipt_args['payment_id']) ?true:false,
70 70
 );
71 71
 
72 72
 $give_receipt_args['donation_receipt']['payment_details'] = array(
73
-	'name'      => __( 'Payment:', 'give' ),
74
-	'value'     => __( 'Details:', 'give' ),
75
-	'display'   => ($give_receipt_args['payment_id'])?false:true,
73
+	'name'      => __('Payment:', 'give'),
74
+	'value'     => __('Details:', 'give'),
75
+	'display'   => ($give_receipt_args['payment_id']) ?false:true,
76 76
 );
77 77
 
78 78
 $give_receipt_args['donation_receipt']['payment_key'] = array(
79
-	'name'      => __( 'Payment Key', 'give' ),
80
-	'value'     => get_post_meta( $donation_id, '_give_payment_purchase_key', true ),
79
+	'name'      => __('Payment Key', 'give'),
80
+	'value'     => get_post_meta($donation_id, '_give_payment_purchase_key', true),
81 81
 	'display'   => $give_receipt_args['payment_key'],
82 82
 );
83 83
 
84 84
 $give_receipt_args['donation_receipt']['payment_method'] = array(
85
-	'name'      => __( 'Payment Method', 'give' ),
86
-	'value'     => give_get_gateway_checkout_label( give_get_payment_gateway( $donation_id ) ),
85
+	'name'      => __('Payment Method', 'give'),
86
+	'value'     => give_get_gateway_checkout_label(give_get_payment_gateway($donation_id)),
87 87
 	'display'   => true,
88 88
 );
89 89
 
@@ -98,49 +98,49 @@  discard block
 block discarded – undo
98 98
  *
99 99
  * @since 1.8.8
100 100
  */
101
-$give_receipt_args['donation_receipt'] = apply_filters( 'give_donation_receipt_args', $give_receipt_args['donation_receipt'], $donation_id, $form_id );
101
+$give_receipt_args['donation_receipt'] = apply_filters('give_donation_receipt_args', $give_receipt_args['donation_receipt'], $donation_id, $form_id);
102 102
 
103 103
 // Show payment status notice based on shortcode attribute.
104
-if ( filter_var( $give_receipt_args['status_notice'], FILTER_VALIDATE_BOOLEAN ) ) {
104
+if (filter_var($give_receipt_args['status_notice'], FILTER_VALIDATE_BOOLEAN)) {
105 105
 	$notice_message = '';
106 106
 	$notice_type    = 'warning';
107 107
 
108
-	switch ( $status ) {
108
+	switch ($status) {
109 109
 		case 'publish':
110
-			$notice_message = __( 'Payment Complete: Thank you for your donation.', 'give' );
110
+			$notice_message = __('Payment Complete: Thank you for your donation.', 'give');
111 111
 			$notice_type    = 'success';
112 112
 			break;
113 113
 		case 'pending':
114
-			$notice_message = __( 'Payment Pending: Your donation is currently processing.', 'give' );
114
+			$notice_message = __('Payment Pending: Your donation is currently processing.', 'give');
115 115
 			$notice_type    = 'warning';
116 116
 			break;
117 117
 		case 'refunded':
118
-			$notice_message = __( 'Payment Refunded: Your donation has been refunded.', 'give' );
118
+			$notice_message = __('Payment Refunded: Your donation has been refunded.', 'give');
119 119
 			$notice_type    = 'warning';
120 120
 			break;
121 121
 		case 'preapproval':
122
-			$notice_message = __( 'Payment Preapproved: Thank you for your donation.', 'give' );
122
+			$notice_message = __('Payment Preapproved: Thank you for your donation.', 'give');
123 123
 			$notice_type    = 'warning';
124 124
 			break;
125 125
 		case 'failed':
126
-			$notice_message = __( 'Payment Failed: Please contact the site owner for assistance.', 'give' );
126
+			$notice_message = __('Payment Failed: Please contact the site owner for assistance.', 'give');
127 127
 			$notice_type    = 'error';
128 128
 			break;
129 129
 		case 'cancelled':
130
-			$notice_message = __( 'Payment Cancelled: Your donation has been cancelled.', 'give' );
130
+			$notice_message = __('Payment Cancelled: Your donation has been cancelled.', 'give');
131 131
 			$notice_type    = 'error';
132 132
 			break;
133 133
 		case 'abandoned':
134
-			$notice_message = __( 'Payment Abandoned: This donation has not been completed.', 'give' );
134
+			$notice_message = __('Payment Abandoned: This donation has not been completed.', 'give');
135 135
 			$notice_type    = 'error';
136 136
 			break;
137 137
 		case 'revoked':
138
-			$notice_message = __( 'Payment Revoked: Please contact the site owner for assistance.', 'give' );
138
+			$notice_message = __('Payment Revoked: Please contact the site owner for assistance.', 'give');
139 139
 			$notice_type    = 'error';
140 140
 			break;
141 141
 	}
142 142
 
143
-	if ( ! empty( $notice_message ) ) {
143
+	if ( ! empty($notice_message)) {
144 144
 		/**
145 145
 		 * Filters payment status notice for receipts.
146 146
 		 *
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
 		 * @param string $status Payment status.
156 156
 		 * @param array  $meta   Array of meta data related to the payment.
157 157
 		 */
158
-		echo apply_filters( 'give_receipt_status_notice', Give()->notices->print_frontend_notice( $notice_message, false, $notice_type ), $id, $status, $meta );
158
+		echo apply_filters('give_receipt_status_notice', Give()->notices->print_frontend_notice($notice_message, false, $notice_type), $id, $status, $meta);
159 159
 	}
160 160
 }// End if().
161 161
 
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
  * @param object $payment           The payment object.
170 170
  * @param array  $give_receipt_args Receipt_argument.
171 171
  */
172
-do_action( 'give_payment_receipt_before_table', $payment, $give_receipt_args );
172
+do_action('give_payment_receipt_before_table', $payment, $give_receipt_args);
173 173
 ?>
174 174
 
175 175
 	<table id="give_donation_receipt" class="give-table">
@@ -185,11 +185,11 @@  discard block
 block discarded – undo
185 185
 		 * @param object $payment           The payment object.
186 186
 		 * @param array  $give_receipt_args Receipt_argument.
187 187
 		 */
188
-		do_action( 'give_payment_receipt_header_before', $payment, $give_receipt_args );
188
+		do_action('give_payment_receipt_header_before', $payment, $give_receipt_args);
189 189
 		?>
190 190
 		<tr>
191 191
 			<th scope="colgroup" colspan="2">
192
-				<span class="give-receipt-thead-text"><?php esc_html_e( 'Donation Receipt', 'give' ) ?></span>
192
+				<span class="give-receipt-thead-text"><?php esc_html_e('Donation Receipt', 'give') ?></span>
193 193
 			</th>
194 194
 		</tr>
195 195
 		<?php
@@ -203,7 +203,7 @@  discard block
 block discarded – undo
203 203
 		 * @param object $payment           The payment object.
204 204
 		 * @param array  $give_receipt_args Receipt_argument.
205 205
 		 */
206
-		do_action( 'give_payment_receipt_header_after', $payment, $give_receipt_args );
206
+		do_action('give_payment_receipt_header_after', $payment, $give_receipt_args);
207 207
 		?>
208 208
 		</thead>
209 209
 
@@ -219,11 +219,11 @@  discard block
 block discarded – undo
219 219
 		 * @param object $payment           The payment object.
220 220
 		 * @param array  $give_receipt_args Receipt_argument.
221 221
 		 */
222
-		do_action( 'give_payment_receipt_before', $payment, $give_receipt_args );
222
+		do_action('give_payment_receipt_before', $payment, $give_receipt_args);
223 223
 		?>
224 224
 
225
-		<?php foreach ( $give_receipt_args['donation_receipt'] as $receipt_item ) { ?>
226
-			<?php if ( filter_var( $receipt_item['display'], FILTER_VALIDATE_BOOLEAN ) ) : ?>
225
+		<?php foreach ($give_receipt_args['donation_receipt'] as $receipt_item) { ?>
226
+			<?php if (filter_var($receipt_item['display'], FILTER_VALIDATE_BOOLEAN)) : ?>
227 227
 			<tr>
228 228
 				<td scope="row"><strong><?php echo $receipt_item['name']; ?></strong></td>
229 229
 				<td><?php echo $receipt_item['value']; ?></td>
@@ -242,7 +242,7 @@  discard block
 block discarded – undo
242 242
 		 * @param object $payment           The payment object.
243 243
 		 * @param array  $give_receipt_args Receipt_argument.
244 244
 		 */
245
-		do_action( 'give_payment_receipt_after', $payment, $give_receipt_args );
245
+		do_action('give_payment_receipt_after', $payment, $give_receipt_args);
246 246
 		?>
247 247
 		</tbody>
248 248
 	</table>
@@ -258,5 +258,5 @@  discard block
 block discarded – undo
258 258
  * @param object $payment           The payment object.
259 259
  * @param array  $give_receipt_args Receipt_argument.
260 260
  */
261
-do_action( 'give_payment_receipt_after_table', $payment, $give_receipt_args );
261
+do_action('give_payment_receipt_after_table', $payment, $give_receipt_args);
262 262
 ?>
Please login to merge, or discard this patch.
includes/admin/welcome.php 1 patch
Spacing   +108 added lines, -108 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
  */
12 12
 
13 13
 // Exit if accessed directly.
14
-if ( ! defined( 'ABSPATH' ) ) {
14
+if ( ! defined('ABSPATH')) {
15 15
 	exit;
16 16
 }
17 17
 
@@ -35,9 +35,9 @@  discard block
 block discarded – undo
35 35
 	 * @since 1.0
36 36
 	 */
37 37
 	public function __construct() {
38
-		add_action( 'admin_menu', array( $this, 'admin_menus' ) );
39
-		add_action( 'admin_head', array( $this, 'admin_head' ) );
40
-		add_action( 'admin_init', array( $this, 'welcome' ) );
38
+		add_action('admin_menu', array($this, 'admin_menus'));
39
+		add_action('admin_head', array($this, 'admin_head'));
40
+		add_action('admin_init', array($this, 'welcome'));
41 41
 	}
42 42
 
43 43
 	/**
@@ -49,45 +49,45 @@  discard block
 block discarded – undo
49 49
 	 * @return void
50 50
 	 */
51 51
 	public function admin_menus() {
52
-		list( $display_version ) = explode( '-', GIVE_VERSION );
52
+		list($display_version) = explode('-', GIVE_VERSION);
53 53
 
54 54
 		// About Page
55 55
 		add_dashboard_page(
56 56
 		/* translators: %s: Give version */
57
-			sprintf( esc_html__( 'Welcome to Give %s', 'give' ), $display_version ),
58
-			esc_html__( 'Welcome to Give', 'give' ),
57
+			sprintf(esc_html__('Welcome to Give %s', 'give'), $display_version),
58
+			esc_html__('Welcome to Give', 'give'),
59 59
 			$this->minimum_capability,
60 60
 			'give-about',
61
-			array( $this, 'about_screen' )
61
+			array($this, 'about_screen')
62 62
 		);
63 63
 
64 64
 		// Changelog Page
65 65
 		add_dashboard_page(
66
-			esc_html__( 'Give Changelog', 'give' ),
67
-			esc_html__( 'Give Changelog', 'give' ),
66
+			esc_html__('Give Changelog', 'give'),
67
+			esc_html__('Give Changelog', 'give'),
68 68
 			$this->minimum_capability,
69 69
 			'give-changelog',
70
-			array( $this, 'changelog_screen' )
70
+			array($this, 'changelog_screen')
71 71
 		);
72 72
 
73 73
 		// Getting Started Page
74 74
 		add_dashboard_page(
75 75
 		/* translators: %s: Give version */
76
-			sprintf( esc_html__( 'Give %s - Getting Started Guide', 'give' ), $display_version ),
77
-			esc_html__( 'Getting started with Give', 'give' ),
76
+			sprintf(esc_html__('Give %s - Getting Started Guide', 'give'), $display_version),
77
+			esc_html__('Getting started with Give', 'give'),
78 78
 			$this->minimum_capability,
79 79
 			'give-getting-started',
80
-			array( $this, 'getting_started_screen' )
80
+			array($this, 'getting_started_screen')
81 81
 		);
82 82
 
83 83
 		// Credits Page
84 84
 		add_dashboard_page(
85 85
 		/* translators: %s: Give version */
86
-			sprintf( esc_html__( 'Give %s - Credits', 'give' ), $display_version ),
87
-			esc_html__( 'The people that build Give', 'give' ),
86
+			sprintf(esc_html__('Give %s - Credits', 'give'), $display_version),
87
+			esc_html__('The people that build Give', 'give'),
88 88
 			$this->minimum_capability,
89 89
 			'give-credits',
90
-			array( $this, 'credits_screen' )
90
+			array($this, 'credits_screen')
91 91
 		);
92 92
 	}
93 93
 
@@ -100,10 +100,10 @@  discard block
 block discarded – undo
100 100
 	 */
101 101
 	public function admin_head() {
102 102
 
103
-		remove_submenu_page( 'index.php', 'give-about' );
104
-		remove_submenu_page( 'index.php', 'give-changelog' );
105
-		remove_submenu_page( 'index.php', 'give-getting-started' );
106
-		remove_submenu_page( 'index.php', 'give-credits' );
103
+		remove_submenu_page('index.php', 'give-about');
104
+		remove_submenu_page('index.php', 'give-changelog');
105
+		remove_submenu_page('index.php', 'give-getting-started');
106
+		remove_submenu_page('index.php', 'give-credits');
107 107
 
108 108
 	}
109 109
 
@@ -115,24 +115,24 @@  discard block
 block discarded – undo
115 115
 	 * @return void
116 116
 	 */
117 117
 	public function tabs() {
118
-		$selected = isset( $_GET['page'] ) ? $_GET['page'] : 'give-about';
118
+		$selected = isset($_GET['page']) ? $_GET['page'] : 'give-about';
119 119
 		?>
120 120
         <h2 class="nav-tab-wrapper">
121 121
             <a class="nav-tab <?php echo $selected == 'give-about' ? 'nav-tab-active' : ''; ?>"
122
-               href="<?php echo esc_url( admin_url( add_query_arg( array( 'page' => 'give-about' ), 'index.php' ) ) ); ?>">
123
-				<?php esc_html_e( 'About Give', 'give' ); ?>
122
+               href="<?php echo esc_url(admin_url(add_query_arg(array('page' => 'give-about'), 'index.php'))); ?>">
123
+				<?php esc_html_e('About Give', 'give'); ?>
124 124
             </a>
125 125
             <a class="nav-tab <?php echo $selected == 'give-getting-started' ? 'nav-tab-active' : ''; ?>"
126
-               href="<?php echo esc_url( admin_url( add_query_arg( array( 'page' => 'give-getting-started' ), 'index.php' ) ) ); ?>">
127
-				<?php esc_html_e( 'Getting Started', 'give' ); ?>
126
+               href="<?php echo esc_url(admin_url(add_query_arg(array('page' => 'give-getting-started'), 'index.php'))); ?>">
127
+				<?php esc_html_e('Getting Started', 'give'); ?>
128 128
             </a>
129 129
             <a class="nav-tab <?php echo $selected == 'give-credits' ? 'nav-tab-active' : ''; ?>"
130
-               href="<?php echo esc_url( admin_url( add_query_arg( array( 'page' => 'give-credits' ), 'index.php' ) ) ); ?>">
131
-				<?php esc_html_e( 'Credits', 'give' ); ?>
130
+               href="<?php echo esc_url(admin_url(add_query_arg(array('page' => 'give-credits'), 'index.php'))); ?>">
131
+				<?php esc_html_e('Credits', 'give'); ?>
132 132
             </a>
133 133
             <a class="nav-tab <?php echo $selected == 'give-add-ons' ? 'nav-tab-active' : ''; ?>"
134
-               href="<?php echo esc_url( admin_url( 'edit.php?post_type=give_forms&page=give-addons' ) ); ?>">
135
-				<?php esc_html_e( 'Add-ons', 'give' ); ?>
134
+               href="<?php echo esc_url(admin_url('edit.php?post_type=give_forms&page=give-addons')); ?>">
135
+				<?php esc_html_e('Add-ons', 'give'); ?>
136 136
             </a>
137 137
         </h2>
138 138
 		<?php
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
 	 * @return void
147 147
 	 */
148 148
 	public function about_screen() {
149
-		list( $display_version ) = explode( '-', GIVE_VERSION );
149
+		list($display_version) = explode('-', GIVE_VERSION);
150 150
 		?>
151 151
         <div class="wrap about-wrap">
152 152
 
@@ -155,8 +155,8 @@  discard block
 block discarded – undo
155 155
             <p class="about-text"><?php
156 156
 				printf(
157 157
 				/* translators: %s: https://givewp.com/documenation/ */
158
-					__( 'Thank you for activating or updating to the latest version of Give! If you\'re a first time user, welcome! You\'re well on your way to empowering your cause. We encourage you to check out the <a href="%s" target="_blank">plugin documentation</a> and getting started guide below.', 'give' ),
159
-					esc_url( 'https://givewp.com/documenation/' )
158
+					__('Thank you for activating or updating to the latest version of Give! If you\'re a first time user, welcome! You\'re well on your way to empowering your cause. We encourage you to check out the <a href="%s" target="_blank">plugin documentation</a> and getting started guide below.', 'give'),
159
+					esc_url('https://givewp.com/documenation/')
160 160
 				);
161 161
 				?></p>
162 162
 
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
             <div class="give-badge"><?php
166 166
 				printf(
167 167
 				/* translators: %s: Give version */
168
-					esc_html__( 'Version %s', 'give' ),
168
+					esc_html__('Version %s', 'give'),
169 169
 					$display_version
170 170
 				);
171 171
 				?></div>
@@ -175,17 +175,17 @@  discard block
 block discarded – undo
175 175
             <div class="feature-section clearfix introduction">
176 176
 
177 177
                 <div class="video feature-section-item">
178
-                    <img src="<?php echo GIVE_PLUGIN_URL . '/assets/images/give-logo-photo-mashup.png' ?>"
179
-                         alt="<?php esc_attr_e( 'Give', 'give' ); ?>">
178
+                    <img src="<?php echo GIVE_PLUGIN_URL.'/assets/images/give-logo-photo-mashup.png' ?>"
179
+                         alt="<?php esc_attr_e('Give', 'give'); ?>">
180 180
                 </div>
181 181
 
182 182
                 <div class="content feature-section-item last-feature">
183 183
 
184
-                    <h3><?php esc_html_e( 'Give - Democratizing Generosity', 'give' ); ?></h3>
184
+                    <h3><?php esc_html_e('Give - Democratizing Generosity', 'give'); ?></h3>
185 185
 
186
-                    <p><?php esc_html_e( 'Give empowers you to easily accept donations and setup fundraising campaigns, directly within WordPress. We created Give to provide a better donation experience for you and your users. Robust, flexible, and intuitive, the plugin is built from the ground up to be the goto donation solution for WordPress. Create powerful donation forms, embed them throughout your website, start a campaign, and exceed your fundraising goals with Give. This plugin is actively developed and proudly supported by folks who are dedicated to helping you and your cause.', 'give' ); ?></p>
186
+                    <p><?php esc_html_e('Give empowers you to easily accept donations and setup fundraising campaigns, directly within WordPress. We created Give to provide a better donation experience for you and your users. Robust, flexible, and intuitive, the plugin is built from the ground up to be the goto donation solution for WordPress. Create powerful donation forms, embed them throughout your website, start a campaign, and exceed your fundraising goals with Give. This plugin is actively developed and proudly supported by folks who are dedicated to helping you and your cause.', 'give'); ?></p>
187 187
                     <a href="https://givewp.com" target="_blank" class="button-secondary">
188
-						<?php esc_html_e( 'Learn More', 'give' ); ?>
188
+						<?php esc_html_e('Learn More', 'give'); ?>
189 189
                         <span class="dashicons dashicons-external"></span>
190 190
                     </a>
191 191
 
@@ -198,22 +198,22 @@  discard block
 block discarded – undo
198 198
 
199 199
                 <div class="content feature-section-item">
200 200
 
201
-                    <h3><?php esc_html_e( 'Getting to Know Give', 'give' ); ?></h3>
201
+                    <h3><?php esc_html_e('Getting to Know Give', 'give'); ?></h3>
202 202
 
203
-                    <p><?php esc_html_e( 'Before you get started with Give we suggest you take a look at the online documentation. There you will find the getting started guide which will help you get up and running quickly. If you have a question, issue or bug with the Core plugin please submit an issue on the Give website. We also welcome your feedback and feature requests. Welcome to Give. We hope you much success with your cause.', 'give' ); ?></p>
203
+                    <p><?php esc_html_e('Before you get started with Give we suggest you take a look at the online documentation. There you will find the getting started guide which will help you get up and running quickly. If you have a question, issue or bug with the Core plugin please submit an issue on the Give website. We also welcome your feedback and feature requests. Welcome to Give. We hope you much success with your cause.', 'give'); ?></p>
204 204
 
205 205
                     <h4>Find Out More:</h4>
206 206
                     <ul class="ul-disc">
207
-                        <li><a href="https://givewp.com/" target="_blank"><?php esc_html_e( 'Visit the Give Website', 'give' ); ?></a></li>
208
-                        <li><a href="https://givewp.com/features/" target="_blank"><?php esc_html_e( 'View the Give Features', 'give' ); ?></a></li>
209
-                        <li><a href="https://givewp.com/documentation/" target="_blank"><?php esc_html_e( 'Read the Documentation', 'give' ); ?></a></li>
207
+                        <li><a href="https://givewp.com/" target="_blank"><?php esc_html_e('Visit the Give Website', 'give'); ?></a></li>
208
+                        <li><a href="https://givewp.com/features/" target="_blank"><?php esc_html_e('View the Give Features', 'give'); ?></a></li>
209
+                        <li><a href="https://givewp.com/documentation/" target="_blank"><?php esc_html_e('Read the Documentation', 'give'); ?></a></li>
210 210
                     </ul>
211 211
 
212 212
                 </div>
213 213
 
214 214
                 <div class="content  feature-section-item last-feature">
215
-                    <img src="<?php echo GIVE_PLUGIN_URL . '/assets/images/admin/give-form-mockup.png' ?>"
216
-                         alt="<?php esc_attr_e( 'A Give donation form', 'give' ); ?>">
215
+                    <img src="<?php echo GIVE_PLUGIN_URL.'/assets/images/admin/give-form-mockup.png' ?>"
216
+                         alt="<?php esc_attr_e('A Give donation form', 'give'); ?>">
217 217
                 </div>
218 218
 
219 219
             </div>
@@ -232,7 +232,7 @@  discard block
 block discarded – undo
232 232
 	 * @return void
233 233
 	 */
234 234
 	public function changelog_screen() {
235
-		list( $display_version ) = explode( '-', GIVE_VERSION );
235
+		list($display_version) = explode('-', GIVE_VERSION);
236 236
 		?>
237 237
         <div class="wrap about-wrap">
238 238
             <h1><?php echo get_admin_page_title(); ?></h1>
@@ -240,14 +240,14 @@  discard block
 block discarded – undo
240 240
             <p class="about-text"><?php
241 241
 				printf(
242 242
 				/* translators: %s: Give version */
243
-					esc_html__( 'Thank you for updating to the latest version! Give %s is ready to make your online store faster, safer, and better!', 'give' ),
243
+					esc_html__('Thank you for updating to the latest version! Give %s is ready to make your online store faster, safer, and better!', 'give'),
244 244
 					$display_version
245 245
 				);
246 246
 				?></p>
247 247
             <div class="give-badge"><?php
248 248
 				printf(
249 249
 				/* translators: %s: Give version */
250
-					esc_html__( 'Version %s', 'give' ),
250
+					esc_html__('Version %s', 'give'),
251 251
 					$display_version
252 252
 				);
253 253
 				?></div>
@@ -255,7 +255,7 @@  discard block
 block discarded – undo
255 255
 			<?php $this->tabs(); ?>
256 256
 
257 257
             <div class="changelog">
258
-                <h3><?php esc_html_e( 'Full Changelog', 'give' ); ?></h3>
258
+                <h3><?php esc_html_e('Full Changelog', 'give'); ?></h3>
259 259
 
260 260
                 <div class="feature-section">
261 261
 					<?php echo $this->parse_readme(); ?>
@@ -263,10 +263,10 @@  discard block
 block discarded – undo
263 263
             </div>
264 264
 
265 265
             <div class="return-to-dashboard">
266
-                <a href="<?php echo esc_url( admin_url( add_query_arg( array(
266
+                <a href="<?php echo esc_url(admin_url(add_query_arg(array(
267 267
 					'post_type' => 'give_forms',
268 268
 					'page'      => 'give-settings'
269
-				), 'edit.php' ) ) ); ?>"><?php esc_html_e( 'Give Settings', 'give' ); ?></a>
269
+				), 'edit.php'))); ?>"><?php esc_html_e('Give Settings', 'give'); ?></a>
270 270
             </div>
271 271
         </div>
272 272
 		<?php
@@ -280,36 +280,36 @@  discard block
 block discarded – undo
280 280
 	 * @return void
281 281
 	 */
282 282
 	public function getting_started_screen() {
283
-		list( $display_version ) = explode( '-', GIVE_VERSION );
283
+		list($display_version) = explode('-', GIVE_VERSION);
284 284
 		?>
285 285
         <div class="wrap about-wrap get-started">
286 286
 
287 287
 			<?php $this->get_welcome_header() ?>
288 288
 
289
-            <p class="about-text"><?php esc_html_e( 'Welcome to the getting started guide.', 'give' ); ?></p>
289
+            <p class="about-text"><?php esc_html_e('Welcome to the getting started guide.', 'give'); ?></p>
290 290
 
291 291
 			<?php give_get_newsletter(); ?>
292 292
 
293 293
             <div class="give-badge"><?php
294 294
 				printf(
295 295
 				/* translators: %s: Give version */
296
-					esc_html__( 'Version %s', 'give' ),
296
+					esc_html__('Version %s', 'give'),
297 297
 					$display_version
298 298
 				);
299 299
 				?></div>
300 300
 
301 301
 			<?php $this->tabs(); ?>
302 302
 
303
-            <p class="about-text"><?php printf( esc_html__( 'Getting started with Give is easy! We put together this quick start guide to help first time users of the plugin. Our goal is to get you up and running in no time. Let\'s begin!', 'give' ), $display_version ); ?></p>
303
+            <p class="about-text"><?php printf(esc_html__('Getting started with Give is easy! We put together this quick start guide to help first time users of the plugin. Our goal is to get you up and running in no time. Let\'s begin!', 'give'), $display_version); ?></p>
304 304
 
305 305
             <div class="feature-section clearfix">
306 306
 
307 307
                 <div class="content feature-section-item">
308
-                    <h3><?php esc_html_e( 'STEP 1: Create a New Form', 'give' ); ?></h3>
308
+                    <h3><?php esc_html_e('STEP 1: Create a New Form', 'give'); ?></h3>
309 309
 
310
-                    <p><?php esc_html_e( 'Give is driven by it\'s powerful donation form building features. However, it is much more than just a "donation form". From the "Add Form" page you\'ll be able to choose how and where you want to receive your donations. You will also be able to set the preferred donation amounts.', 'give' ); ?></p>
310
+                    <p><?php esc_html_e('Give is driven by it\'s powerful donation form building features. However, it is much more than just a "donation form". From the "Add Form" page you\'ll be able to choose how and where you want to receive your donations. You will also be able to set the preferred donation amounts.', 'give'); ?></p>
311 311
 
312
-                    <p><?php esc_html_e( 'All of these features begin by simply going to the menu and choosing "Donations > Add Form".', 'give' ); ?></p>
312
+                    <p><?php esc_html_e('All of these features begin by simply going to the menu and choosing "Donations > Add Form".', 'give'); ?></p>
313 313
                 </div>
314 314
 
315 315
                 <div class="content feature-section-item last-feature">
@@ -326,9 +326,9 @@  discard block
 block discarded – undo
326 326
                 </div>
327 327
 
328 328
                 <div class="content feature-section-item last-feature">
329
-                    <h3><?php esc_html_e( 'STEP 2: Customize Your Donation Forms', 'give' ); ?></h3>
329
+                    <h3><?php esc_html_e('STEP 2: Customize Your Donation Forms', 'give'); ?></h3>
330 330
 
331
-                    <p><?php esc_html_e( 'Each donation form you create can be customized to receive either a pre-determined set donation amount or have multiple suggested levels of giving. Choosing "Multi-level Donation" opens up the donation levels view where you can add as many levels as you\'d like with your own custom names and suggested amounts. As well, you can allow donors to give a custom amount and even set up donation goals.', 'give' ); ?></p>
331
+                    <p><?php esc_html_e('Each donation form you create can be customized to receive either a pre-determined set donation amount or have multiple suggested levels of giving. Choosing "Multi-level Donation" opens up the donation levels view where you can add as many levels as you\'d like with your own custom names and suggested amounts. As well, you can allow donors to give a custom amount and even set up donation goals.', 'give'); ?></p>
332 332
                 </div>
333 333
 
334 334
             </div>
@@ -337,11 +337,11 @@  discard block
 block discarded – undo
337 337
             <div class="feature-section clearfix">
338 338
 
339 339
                 <div class="content feature-section-item add-content">
340
-                    <h3><?php esc_html_e( 'STEP 3: Add Additional Content', 'give' ); ?></h3>
340
+                    <h3><?php esc_html_e('STEP 3: Add Additional Content', 'give'); ?></h3>
341 341
 
342
-                    <p><?php esc_html_e( 'Every donation form you create with Give can be used on its own stand-alone page, or it can be inserted into any other page or post throughout your site via a shortcode or widget.', 'give' ); ?></p>
342
+                    <p><?php esc_html_e('Every donation form you create with Give can be used on its own stand-alone page, or it can be inserted into any other page or post throughout your site via a shortcode or widget.', 'give'); ?></p>
343 343
 
344
-                    <p><?php esc_html_e( 'You can choose these different modes by going to the "Form Content" section. From there, you can choose to add content before or after the donation form on a page, or if you choose "None" perhaps you want to instead use the shortcode. You can find the shortcode in the top right column directly under the Publish/Save button. This feature gives you the most amount of flexibility with controlling your content on your website all within the same page.', 'give' ); ?></p>
344
+                    <p><?php esc_html_e('You can choose these different modes by going to the "Form Content" section. From there, you can choose to add content before or after the donation form on a page, or if you choose "None" perhaps you want to instead use the shortcode. You can find the shortcode in the top right column directly under the Publish/Save button. This feature gives you the most amount of flexibility with controlling your content on your website all within the same page.', 'give'); ?></p>
345 345
                 </div>
346 346
 
347 347
                 <div class="content feature-section-item last-feature">
@@ -358,9 +358,9 @@  discard block
 block discarded – undo
358 358
                 </div>
359 359
 
360 360
                 <div class="content feature-section-item last-feature">
361
-                    <h3><?php esc_html_e( 'STEP 4: Configure Your Display Options', 'give' ); ?></h3>
361
+                    <h3><?php esc_html_e('STEP 4: Configure Your Display Options', 'give'); ?></h3>
362 362
 
363
-                    <p><?php esc_html_e( 'Lastly, you can present the form in a number of different ways that each create their own unique donor experience. The "Modal" display mode opens the credit card fieldset within a popup window. The "Reveal" mode will slide into place the additional fields. If you\'re looking for a simple button, then "Button" more is the way to go. This allows you to create a customizable "Donate Now" button which will open the donation form upon clicking. There\'s tons of possibilities here, give it a try!', 'give' ); ?></p>
363
+                    <p><?php esc_html_e('Lastly, you can present the form in a number of different ways that each create their own unique donor experience. The "Modal" display mode opens the credit card fieldset within a popup window. The "Reveal" mode will slide into place the additional fields. If you\'re looking for a simple button, then "Button" more is the way to go. This allows you to create a customizable "Donate Now" button which will open the donation form upon clicking. There\'s tons of possibilities here, give it a try!', 'give'); ?></p>
364 364
                 </div>
365 365
 
366 366
 
@@ -380,20 +380,20 @@  discard block
 block discarded – undo
380 380
 	 * @return void
381 381
 	 */
382 382
 	public function credits_screen() {
383
-		list( $display_version ) = explode( '-', GIVE_VERSION );
383
+		list($display_version) = explode('-', GIVE_VERSION);
384 384
 		?>
385 385
         <div class="wrap about-wrap">
386 386
 
387 387
 			<?php $this->get_welcome_header() ?>
388 388
 
389
-            <p class="about-text"><?php esc_html_e( 'Thanks to all those who have contributed code directly or indirectly.', 'give' ); ?></p>
389
+            <p class="about-text"><?php esc_html_e('Thanks to all those who have contributed code directly or indirectly.', 'give'); ?></p>
390 390
 
391 391
 			<?php give_get_newsletter(); ?>
392 392
 
393 393
             <div class="give-badge"><?php
394 394
 				printf(
395 395
 				/* translators: %s: Give version */
396
-					esc_html__( 'Version %s', 'give' ),
396
+					esc_html__('Version %s', 'give'),
397 397
 					$display_version
398 398
 				);
399 399
 				?></div>
@@ -403,8 +403,8 @@  discard block
 block discarded – undo
403 403
             <p class="about-description"><?php
404 404
 				printf(
405 405
 				/* translators: %s: https://github.com/WordImpress/give */
406
-					__( 'Give is created by a dedicated team of developers. If you are interested in contributing please visit the <a href="%s" target="_blank">GitHub Repo</a>.', 'give' ),
407
-					esc_url( 'https://github.com/WordImpress/give' )
406
+					__('Give is created by a dedicated team of developers. If you are interested in contributing please visit the <a href="%s" target="_blank">GitHub Repo</a>.', 'give'),
407
+					esc_url('https://github.com/WordImpress/give')
408 408
 				);
409 409
 				?></p>
410 410
 
@@ -421,21 +421,21 @@  discard block
 block discarded – undo
421 421
 	 * @return string $readme HTML formatted readme file
422 422
 	 */
423 423
 	public function parse_readme() {
424
-		$file = file_exists( GIVE_PLUGIN_DIR . 'readme.txt' ) ? GIVE_PLUGIN_DIR . 'readme.txt' : null;
424
+		$file = file_exists(GIVE_PLUGIN_DIR.'readme.txt') ? GIVE_PLUGIN_DIR . 'readme.txt' : null;
425 425
 
426
-		if ( ! $file ) {
427
-			$readme = '<p>' . esc_html__( 'No valid changlog was found.', 'give' ) . '</p>';
426
+		if ( ! $file) {
427
+			$readme = '<p>'.esc_html__('No valid changlog was found.', 'give').'</p>';
428 428
 		} else {
429
-			$readme = file_get_contents( $file );
430
-			$readme = nl2br( esc_html( $readme ) );
431
-			$readme = explode( '== Changelog ==', $readme );
432
-			$readme = end( $readme );
433
-
434
-			$readme = preg_replace( '/`(.*?)`/', '<code>\\1</code>', $readme );
435
-			$readme = preg_replace( '/[\040]\*\*(.*?)\*\*/', ' <strong>\\1</strong>', $readme );
436
-			$readme = preg_replace( '/[\040]\*(.*?)\*/', ' <em>\\1</em>', $readme );
437
-			$readme = preg_replace( '/= (.*?) =/', '<h4>\\1</h4>', $readme );
438
-			$readme = preg_replace( '/\[(.*?)\]\((.*?)\)/', '<a href="\\2">\\1</a>', $readme );
429
+			$readme = file_get_contents($file);
430
+			$readme = nl2br(esc_html($readme));
431
+			$readme = explode('== Changelog ==', $readme);
432
+			$readme = end($readme);
433
+
434
+			$readme = preg_replace('/`(.*?)`/', '<code>\\1</code>', $readme);
435
+			$readme = preg_replace('/[\040]\*\*(.*?)\*\*/', ' <strong>\\1</strong>', $readme);
436
+			$readme = preg_replace('/[\040]\*(.*?)\*/', ' <em>\\1</em>', $readme);
437
+			$readme = preg_replace('/= (.*?) =/', '<h4>\\1</h4>', $readme);
438
+			$readme = preg_replace('/\[(.*?)\]\((.*?)\)/', '<a href="\\2">\\1</a>', $readme);
439 439
 		}
440 440
 
441 441
 		return $readme;
@@ -452,24 +452,24 @@  discard block
 block discarded – undo
452 452
 	public function contributors() {
453 453
 		$contributors = $this->get_contributors();
454 454
 
455
-		if ( empty( $contributors ) ) {
455
+		if (empty($contributors)) {
456 456
 			return '';
457 457
 		}
458 458
 
459 459
 		$contributor_list = '<ul class="wp-people-group">';
460 460
 
461
-		foreach ( $contributors as $contributor ) {
461
+		foreach ($contributors as $contributor) {
462 462
 			$contributor_list .= '<li class="wp-person">';
463 463
 			$contributor_list .= sprintf(
464 464
 				'<a href="%1$s" target="_blank"><img src="%2$s" width="64" height="64" class="gravatar" alt="%3$s" /></a>',
465
-				esc_url( 'https://github.com/' . $contributor->login ),
466
-				esc_url( $contributor->avatar_url ),
467
-				esc_attr( $contributor->login )
465
+				esc_url('https://github.com/'.$contributor->login),
466
+				esc_url($contributor->avatar_url),
467
+				esc_attr($contributor->login)
468 468
 			);
469 469
 			$contributor_list .= sprintf(
470 470
 				'<a class="web" target="_blank" href="%1$s">%2$s</a>',
471
-				esc_url( 'https://github.com/' . $contributor->login ),
472
-				esc_html( $contributor->login )
471
+				esc_url('https://github.com/'.$contributor->login),
472
+				esc_html($contributor->login)
473 473
 			);
474 474
 			$contributor_list .= '</li>';
475 475
 		}
@@ -487,25 +487,25 @@  discard block
 block discarded – undo
487 487
 	 * @return array $contributors List of contributors
488 488
 	 */
489 489
 	public function get_contributors() {
490
-		$contributors = Give_Cache::get( 'give_contributors', true );
490
+		$contributors = Give_Cache::get('give_contributors', true);
491 491
 
492
-		if ( false !== $contributors ) {
492
+		if (false !== $contributors) {
493 493
 			return $contributors;
494 494
 		}
495 495
 
496
-		$response = wp_remote_get( 'https://api.github.com/repos/WordImpress/Give/contributors', array( 'sslverify' => false ) );
496
+		$response = wp_remote_get('https://api.github.com/repos/WordImpress/Give/contributors', array('sslverify' => false));
497 497
 
498
-		if ( is_wp_error( $response ) || 200 != wp_remote_retrieve_response_code( $response ) ) {
498
+		if (is_wp_error($response) || 200 != wp_remote_retrieve_response_code($response)) {
499 499
 			return array();
500 500
 		}
501 501
 
502
-		$contributors = json_decode( wp_remote_retrieve_body( $response ) );
502
+		$contributors = json_decode(wp_remote_retrieve_body($response));
503 503
 
504
-		if ( ! is_array( $contributors ) ) {
504
+		if ( ! is_array($contributors)) {
505 505
 			return array();
506 506
 		}
507 507
 
508
-		Give_Cache::set( 'give_contributors', $contributors, HOUR_IN_SECONDS, true );
508
+		Give_Cache::set('give_contributors', $contributors, HOUR_IN_SECONDS, true);
509 509
 
510 510
 		return $contributors;
511 511
 	}
@@ -517,7 +517,7 @@  discard block
 block discarded – undo
517 517
 	 */
518 518
 	public function get_welcome_header() {
519 519
 		// Badge for welcome page
520
-		$badge_url = GIVE_PLUGIN_URL . 'assets/images/give-badge.png';
520
+		$badge_url = GIVE_PLUGIN_URL.'assets/images/give-badge.png';
521 521
 		?>
522 522
         <h1 class="welcome-h1"><?php echo get_admin_page_title(); ?></h1>
523 523
 		<?php $this->social_media_elements(); ?>
@@ -610,7 +610,7 @@  discard block
 block discarded – undo
610 610
             <a href="https://twitter.com/givewp" class="twitter-follow-button" data-show-count="false"><?php
611 611
 				printf(
612 612
 				/* translators: %s: Give twitter user @givewp */
613
-					esc_html_e( 'Follow %s', 'give' ),
613
+					esc_html_e('Follow %s', 'give'),
614 614
 					'@givewp'
615 615
 				);
616 616
 				?></a>
@@ -644,27 +644,27 @@  discard block
 block discarded – undo
644 644
 	public function welcome() {
645 645
 
646 646
 		// Bail if no activation redirect
647
-		if ( ! Give_Cache::get( '_give_activation_redirect', true ) ) {
647
+		if ( ! Give_Cache::get('_give_activation_redirect', true)) {
648 648
 			return;
649 649
 		}
650 650
 
651 651
 		// Delete the redirect transient
652
-		Give_Cache::delete( Give_Cache::get_key( '_give_activation_redirect' ) );
652
+		Give_Cache::delete(Give_Cache::get_key('_give_activation_redirect'));
653 653
 
654 654
 		// Bail if activating from network, or bulk
655
-		if ( is_network_admin() || isset( $_GET['activate-multi'] ) ) {
655
+		if (is_network_admin() || isset($_GET['activate-multi'])) {
656 656
 			return;
657 657
 		}
658 658
 
659
-		$upgrade = get_option( 'give_version_upgraded_from' );
659
+		$upgrade = get_option('give_version_upgraded_from');
660 660
 
661
-		if ( ! $upgrade ) { // First time install
662
-			wp_safe_redirect( admin_url( 'index.php?page=give-about' ) );
661
+		if ( ! $upgrade) { // First time install
662
+			wp_safe_redirect(admin_url('index.php?page=give-about'));
663 663
 			exit;
664
-		} elseif ( ! give_is_setting_enabled( give_get_option( 'welcome' ) ) ) { // Welcome is disabled in settings
664
+		} elseif ( ! give_is_setting_enabled(give_get_option('welcome'))) { // Welcome is disabled in settings
665 665
 
666 666
 		} else { // Welcome is NOT disabled in settings
667
-			wp_safe_redirect( admin_url( 'index.php?page=give-about' ) );
667
+			wp_safe_redirect(admin_url('index.php?page=give-about'));
668 668
 			exit;
669 669
 		}
670 670
 	}
Please login to merge, or discard this patch.
includes/class-give-stats.php 1 patch
Spacing   +106 added lines, -106 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
  */
11 11
 
12 12
 // Exit if accessed directly.
13
-if ( ! defined( 'ABSPATH' ) ) {
13
+if ( ! defined('ABSPATH')) {
14 14
 	exit;
15 15
 }
16 16
 
@@ -93,19 +93,19 @@  discard block
 block discarded – undo
93 93
 	 */
94 94
 	public function get_predefined_dates() {
95 95
 		$predefined = array(
96
-			'today'        => esc_html__( 'Today', 'give' ),
97
-			'yesterday'    => esc_html__( 'Yesterday', 'give' ),
98
-			'this_week'    => esc_html__( 'This Week', 'give' ),
99
-			'last_week'    => esc_html__( 'Last Week', 'give' ),
100
-			'this_month'   => esc_html__( 'This Month', 'give' ),
101
-			'last_month'   => esc_html__( 'Last Month', 'give' ),
102
-			'this_quarter' => esc_html__( 'This Quarter', 'give' ),
103
-			'last_quarter' => esc_html__( 'Last Quarter', 'give' ),
104
-			'this_year'    => esc_html__( 'This Year', 'give' ),
105
-			'last_year'    => esc_html__( 'Last Year', 'give' ),
96
+			'today'        => esc_html__('Today', 'give'),
97
+			'yesterday'    => esc_html__('Yesterday', 'give'),
98
+			'this_week'    => esc_html__('This Week', 'give'),
99
+			'last_week'    => esc_html__('Last Week', 'give'),
100
+			'this_month'   => esc_html__('This Month', 'give'),
101
+			'last_month'   => esc_html__('Last Month', 'give'),
102
+			'this_quarter' => esc_html__('This Quarter', 'give'),
103
+			'last_quarter' => esc_html__('Last Quarter', 'give'),
104
+			'this_year'    => esc_html__('This Year', 'give'),
105
+			'last_year'    => esc_html__('Last Year', 'give'),
106 106
 		);
107 107
 
108
-		return apply_filters( 'give_stats_predefined_dates', $predefined );
108
+		return apply_filters('give_stats_predefined_dates', $predefined);
109 109
 	}
110 110
 
111 111
 	/**
@@ -121,18 +121,18 @@  discard block
 block discarded – undo
121 121
 	 *
122 122
 	 * @return void
123 123
 	 */
124
-	public function setup_dates( $_start_date = 'this_month', $_end_date = false ) {
124
+	public function setup_dates($_start_date = 'this_month', $_end_date = false) {
125 125
 
126
-		if ( empty( $_start_date ) ) {
126
+		if (empty($_start_date)) {
127 127
 			$_start_date = 'this_month';
128 128
 		}
129 129
 
130
-		if ( empty( $_end_date ) ) {
130
+		if (empty($_end_date)) {
131 131
 			$_end_date = $_start_date;
132 132
 		}
133 133
 
134
-		$this->start_date = $this->convert_date( $_start_date );
135
-		$this->end_date   = $this->convert_date( $_end_date, true );
134
+		$this->start_date = $this->convert_date($_start_date);
135
+		$this->end_date   = $this->convert_date($_end_date, true);
136 136
 	}
137 137
 
138 138
 	/**
@@ -148,26 +148,26 @@  discard block
 block discarded – undo
148 148
 	 *
149 149
 	 * @return array|WP_Error   If the date is invalid, a WP_Error object will be returned.
150 150
 	 */
151
-	public function convert_date( $date, $end_date = false ) {
151
+	public function convert_date($date, $end_date = false) {
152 152
 
153 153
 		$this->timestamp = false;
154 154
 		$second          = $end_date ? 59 : 0;
155 155
 		$minute          = $end_date ? 59 : 0;
156 156
 		$hour            = $end_date ? 23 : 0;
157 157
 		$day             = 1;
158
-		$month           = date( 'n', current_time( 'timestamp' ) );
159
-		$year            = date( 'Y', current_time( 'timestamp' ) );
158
+		$month           = date('n', current_time('timestamp'));
159
+		$year            = date('Y', current_time('timestamp'));
160 160
 
161
-		if ( array_key_exists( (string) $date, $this->get_predefined_dates() ) ) {
161
+		if (array_key_exists((string) $date, $this->get_predefined_dates())) {
162 162
 
163 163
 			// This is a predefined date rate, such as last_week
164
-			switch ( $date ) {
164
+			switch ($date) {
165 165
 
166 166
 				case 'this_month' :
167 167
 
168
-					if ( $end_date ) {
168
+					if ($end_date) {
169 169
 
170
-						$day    = cal_days_in_month( CAL_GREGORIAN, $month, $year );
170
+						$day    = cal_days_in_month(CAL_GREGORIAN, $month, $year);
171 171
 						$hour   = 23;
172 172
 						$minute = 59;
173 173
 						$second = 59;
@@ -177,28 +177,28 @@  discard block
 block discarded – undo
177 177
 
178 178
 				case 'last_month' :
179 179
 
180
-					if ( $month == 1 ) {
180
+					if ($month == 1) {
181 181
 
182 182
 						$month = 12;
183
-						$year --;
183
+						$year--;
184 184
 
185 185
 					} else {
186 186
 
187
-						$month --;
187
+						$month--;
188 188
 
189 189
 					}
190 190
 
191
-					if ( $end_date ) {
192
-						$day = cal_days_in_month( CAL_GREGORIAN, $month, $year );
191
+					if ($end_date) {
192
+						$day = cal_days_in_month(CAL_GREGORIAN, $month, $year);
193 193
 					}
194 194
 
195 195
 					break;
196 196
 
197 197
 				case 'today' :
198 198
 
199
-					$day = date( 'd', current_time( 'timestamp' ) );
199
+					$day = date('d', current_time('timestamp'));
200 200
 
201
-					if ( $end_date ) {
201
+					if ($end_date) {
202 202
 						$hour   = 23;
203 203
 						$minute = 59;
204 204
 						$second = 59;
@@ -208,23 +208,23 @@  discard block
 block discarded – undo
208 208
 
209 209
 				case 'yesterday' :
210 210
 
211
-					$day = date( 'd', current_time( 'timestamp' ) ) - 1;
211
+					$day = date('d', current_time('timestamp')) - 1;
212 212
 
213 213
 					// Check if Today is the first day of the month (meaning subtracting one will get us 0)
214
-					if ( $day < 1 ) {
214
+					if ($day < 1) {
215 215
 
216 216
 						// If current month is 1
217
-						if ( 1 == $month ) {
217
+						if (1 == $month) {
218 218
 
219 219
 							$year -= 1; // Today is January 1, so skip back to last day of December
220 220
 							$month = 12;
221
-							$day   = cal_days_in_month( CAL_GREGORIAN, $month, $year );
221
+							$day   = cal_days_in_month(CAL_GREGORIAN, $month, $year);
222 222
 
223 223
 						} else {
224 224
 
225 225
 							// Go back one month and get the last day of the month
226 226
 							$month -= 1;
227
-							$day = cal_days_in_month( CAL_GREGORIAN, $month, $year );
227
+							$day = cal_days_in_month(CAL_GREGORIAN, $month, $year);
228 228
 
229 229
 						}
230 230
 					}
@@ -233,12 +233,12 @@  discard block
 block discarded – undo
233 233
 
234 234
 				case 'this_week' :
235 235
 
236
-					$days_to_week_start = ( date( 'w', current_time( 'timestamp' ) ) - 1 ) * 60 * 60 * 24;
237
-					$today              = date( 'd', current_time( 'timestamp' ) ) * 60 * 60 * 24;
236
+					$days_to_week_start = (date('w', current_time('timestamp')) - 1) * 60 * 60 * 24;
237
+					$today              = date('d', current_time('timestamp')) * 60 * 60 * 24;
238 238
 
239
-					if ( $today < $days_to_week_start ) {
239
+					if ($today < $days_to_week_start) {
240 240
 
241
-						if ( $month > 1 ) {
241
+						if ($month > 1) {
242 242
 							$month -= 1;
243 243
 						} else {
244 244
 							$month = 12;
@@ -246,19 +246,19 @@  discard block
 block discarded – undo
246 246
 
247 247
 					}
248 248
 
249
-					if ( ! $end_date ) {
249
+					if ( ! $end_date) {
250 250
 
251 251
 						// Getting the start day
252 252
 
253
-						$day = date( 'd', current_time( 'timestamp' ) - $days_to_week_start ) - 1;
254
-						$day += get_option( 'start_of_week' );
253
+						$day = date('d', current_time('timestamp') - $days_to_week_start) - 1;
254
+						$day += get_option('start_of_week');
255 255
 
256 256
 					} else {
257 257
 
258 258
 						// Getting the end day
259 259
 
260
-						$day = date( 'd', current_time( 'timestamp' ) - $days_to_week_start ) - 1;
261
-						$day += get_option( 'start_of_week' ) + 6;
260
+						$day = date('d', current_time('timestamp') - $days_to_week_start) - 1;
261
+						$day += get_option('start_of_week') + 6;
262 262
 
263 263
 					}
264 264
 
@@ -266,12 +266,12 @@  discard block
 block discarded – undo
266 266
 
267 267
 				case 'last_week' :
268 268
 
269
-					$days_to_week_start = ( date( 'w', current_time( 'timestamp' ) ) - 1 ) * 60 * 60 * 24;
270
-					$today              = date( 'd', current_time( 'timestamp' ) ) * 60 * 60 * 24;
269
+					$days_to_week_start = (date('w', current_time('timestamp')) - 1) * 60 * 60 * 24;
270
+					$today              = date('d', current_time('timestamp')) * 60 * 60 * 24;
271 271
 
272
-					if ( $today < $days_to_week_start ) {
272
+					if ($today < $days_to_week_start) {
273 273
 
274
-						if ( $month > 1 ) {
274
+						if ($month > 1) {
275 275
 							$month -= 1;
276 276
 						} else {
277 277
 							$month = 12;
@@ -279,19 +279,19 @@  discard block
 block discarded – undo
279 279
 
280 280
 					}
281 281
 
282
-					if ( ! $end_date ) {
282
+					if ( ! $end_date) {
283 283
 
284 284
 						// Getting the start day
285 285
 
286
-						$day = date( 'd', current_time( 'timestamp' ) - $days_to_week_start ) - 8;
287
-						$day += get_option( 'start_of_week' );
286
+						$day = date('d', current_time('timestamp') - $days_to_week_start) - 8;
287
+						$day += get_option('start_of_week');
288 288
 
289 289
 					} else {
290 290
 
291 291
 						// Getting the end day
292 292
 
293
-						$day = date( 'd', current_time( 'timestamp' ) - $days_to_week_start ) - 8;
294
-						$day += get_option( 'start_of_week' ) + 6;
293
+						$day = date('d', current_time('timestamp') - $days_to_week_start) - 8;
294
+						$day += get_option('start_of_week') + 6;
295 295
 
296 296
 					}
297 297
 
@@ -299,39 +299,39 @@  discard block
 block discarded – undo
299 299
 
300 300
 				case 'this_quarter' :
301 301
 
302
-					$month_now = date( 'n', current_time( 'timestamp' ) );
302
+					$month_now = date('n', current_time('timestamp'));
303 303
 
304
-					if ( $month_now <= 3 ) {
304
+					if ($month_now <= 3) {
305 305
 
306
-						if ( ! $end_date ) {
306
+						if ( ! $end_date) {
307 307
 							$month = 1;
308 308
 						} else {
309 309
 							$month  = 3;
310
-							$day    = cal_days_in_month( CAL_GREGORIAN, $month, $year );
310
+							$day    = cal_days_in_month(CAL_GREGORIAN, $month, $year);
311 311
 							$hour   = 23;
312 312
 							$minute = 59;
313 313
 							$second = 59;
314 314
 						}
315 315
 
316
-					} else if ( $month_now <= 6 ) {
316
+					} else if ($month_now <= 6) {
317 317
 
318
-						if ( ! $end_date ) {
318
+						if ( ! $end_date) {
319 319
 							$month = 4;
320 320
 						} else {
321 321
 							$month  = 6;
322
-							$day    = cal_days_in_month( CAL_GREGORIAN, $month, $year );
322
+							$day    = cal_days_in_month(CAL_GREGORIAN, $month, $year);
323 323
 							$hour   = 23;
324 324
 							$minute = 59;
325 325
 							$second = 59;
326 326
 						}
327 327
 
328
-					} else if ( $month_now <= 9 ) {
328
+					} else if ($month_now <= 9) {
329 329
 
330
-						if ( ! $end_date ) {
330
+						if ( ! $end_date) {
331 331
 							$month = 7;
332 332
 						} else {
333 333
 							$month  = 9;
334
-							$day    = cal_days_in_month( CAL_GREGORIAN, $month, $year );
334
+							$day    = cal_days_in_month(CAL_GREGORIAN, $month, $year);
335 335
 							$hour   = 23;
336 336
 							$minute = 59;
337 337
 							$second = 59;
@@ -339,11 +339,11 @@  discard block
 block discarded – undo
339 339
 
340 340
 					} else {
341 341
 
342
-						if ( ! $end_date ) {
342
+						if ( ! $end_date) {
343 343
 							$month = 10;
344 344
 						} else {
345 345
 							$month  = 12;
346
-							$day    = cal_days_in_month( CAL_GREGORIAN, $month, $year );
346
+							$day    = cal_days_in_month(CAL_GREGORIAN, $month, $year);
347 347
 							$hour   = 23;
348 348
 							$minute = 59;
349 349
 							$second = 59;
@@ -355,40 +355,40 @@  discard block
 block discarded – undo
355 355
 
356 356
 				case 'last_quarter' :
357 357
 
358
-					$month_now = date( 'n', current_time( 'timestamp' ) );
358
+					$month_now = date('n', current_time('timestamp'));
359 359
 
360
-					if ( $month_now <= 3 ) {
360
+					if ($month_now <= 3) {
361 361
 
362
-						if ( ! $end_date ) {
362
+						if ( ! $end_date) {
363 363
 							$month = 10;
364 364
 						} else {
365 365
 							$year -= 1;
366 366
 							$month  = 12;
367
-							$day    = cal_days_in_month( CAL_GREGORIAN, $month, $year );
367
+							$day    = cal_days_in_month(CAL_GREGORIAN, $month, $year);
368 368
 							$hour   = 23;
369 369
 							$minute = 59;
370 370
 							$second = 59;
371 371
 						}
372 372
 
373
-					} else if ( $month_now <= 6 ) {
373
+					} else if ($month_now <= 6) {
374 374
 
375
-						if ( ! $end_date ) {
375
+						if ( ! $end_date) {
376 376
 							$month = 1;
377 377
 						} else {
378 378
 							$month  = 3;
379
-							$day    = cal_days_in_month( CAL_GREGORIAN, $month, $year );
379
+							$day    = cal_days_in_month(CAL_GREGORIAN, $month, $year);
380 380
 							$hour   = 23;
381 381
 							$minute = 59;
382 382
 							$second = 59;
383 383
 						}
384 384
 
385
-					} else if ( $month_now <= 9 ) {
385
+					} else if ($month_now <= 9) {
386 386
 
387
-						if ( ! $end_date ) {
387
+						if ( ! $end_date) {
388 388
 							$month = 4;
389 389
 						} else {
390 390
 							$month  = 6;
391
-							$day    = cal_days_in_month( CAL_GREGORIAN, $month, $year );
391
+							$day    = cal_days_in_month(CAL_GREGORIAN, $month, $year);
392 392
 							$hour   = 23;
393 393
 							$minute = 59;
394 394
 							$second = 59;
@@ -396,11 +396,11 @@  discard block
 block discarded – undo
396 396
 
397 397
 					} else {
398 398
 
399
-						if ( ! $end_date ) {
399
+						if ( ! $end_date) {
400 400
 							$month = 7;
401 401
 						} else {
402 402
 							$month  = 9;
403
-							$day    = cal_days_in_month( CAL_GREGORIAN, $month, $year );
403
+							$day    = cal_days_in_month(CAL_GREGORIAN, $month, $year);
404 404
 							$hour   = 23;
405 405
 							$minute = 59;
406 406
 							$second = 59;
@@ -412,11 +412,11 @@  discard block
 block discarded – undo
412 412
 
413 413
 				case 'this_year' :
414 414
 
415
-					if ( ! $end_date ) {
415
+					if ( ! $end_date) {
416 416
 						$month = 1;
417 417
 					} else {
418 418
 						$month  = 12;
419
-						$day    = cal_days_in_month( CAL_GREGORIAN, $month, $year );
419
+						$day    = cal_days_in_month(CAL_GREGORIAN, $month, $year);
420 420
 						$hour   = 23;
421 421
 						$minute = 59;
422 422
 						$second = 59;
@@ -427,11 +427,11 @@  discard block
 block discarded – undo
427 427
 				case 'last_year' :
428 428
 
429 429
 					$year -= 1;
430
-					if ( ! $end_date ) {
430
+					if ( ! $end_date) {
431 431
 						$month = 1;
432 432
 					} else {
433 433
 						$month  = 12;
434
-						$day    = cal_days_in_month( CAL_GREGORIAN, $month, $year );
434
+						$day    = cal_days_in_month(CAL_GREGORIAN, $month, $year);
435 435
 						$hour   = 23;
436 436
 						$minute = 59;
437 437
 						$second = 59;
@@ -442,30 +442,30 @@  discard block
 block discarded – undo
442 442
 			}
443 443
 
444 444
 
445
-		} else if ( is_numeric( $date ) ) {
445
+		} else if (is_numeric($date)) {
446 446
 
447 447
 			// return $date unchanged since it is a timestamp
448 448
 			$this->timestamp = true;
449 449
 
450
-		} else if ( false !== strtotime( $date ) ) {
450
+		} else if (false !== strtotime($date)) {
451 451
 
452
-			$date  = strtotime( $date, current_time( 'timestamp' ) );
453
-			$year  = date( 'Y', $date );
454
-			$month = date( 'm', $date );
455
-			$day   = date( 'd', $date );
452
+			$date  = strtotime($date, current_time('timestamp'));
453
+			$year  = date('Y', $date);
454
+			$month = date('m', $date);
455
+			$day   = date('d', $date);
456 456
 
457 457
 		} else {
458 458
 
459
-			return new WP_Error( 'invalid_date', esc_html__( 'Improper date provided.', 'give' ) );
459
+			return new WP_Error('invalid_date', esc_html__('Improper date provided.', 'give'));
460 460
 
461 461
 		}
462 462
 
463
-		if ( false === $this->timestamp ) {
463
+		if (false === $this->timestamp) {
464 464
 			// Create an exact timestamp
465
-			$date = mktime( $hour, $minute, $second, $month, $day, $year );
465
+			$date = mktime($hour, $minute, $second, $month, $day, $year);
466 466
 		}
467 467
 
468
-		return apply_filters( 'give_stats_date', $date, $end_date, $this );
468
+		return apply_filters('give_stats_date', $date, $end_date, $this);
469 469
 
470 470
 	}
471 471
 
@@ -481,33 +481,33 @@  discard block
 block discarded – undo
481 481
 	 * 
482 482
 	 * @return string
483 483
 	 */
484
-	public function count_where( $where = '' ) {
484
+	public function count_where($where = '') {
485 485
 		// Only get payments in our date range
486 486
 
487 487
 		$start_where = '';
488 488
 		$end_where   = '';
489 489
 
490
-		if ( $this->start_date ) {
490
+		if ($this->start_date) {
491 491
 
492
-			if ( $this->timestamp ) {
492
+			if ($this->timestamp) {
493 493
 				$format = 'Y-m-d H:i:s';
494 494
 			} else {
495 495
 				$format = 'Y-m-d 00:00:00';
496 496
 			}
497 497
 
498
-			$start_date  = date( $format, $this->start_date );
498
+			$start_date  = date($format, $this->start_date);
499 499
 			$start_where = " AND p.post_date >= '{$start_date}'";
500 500
 		}
501 501
 
502
-		if ( $this->end_date ) {
502
+		if ($this->end_date) {
503 503
 
504
-			if ( $this->timestamp ) {
504
+			if ($this->timestamp) {
505 505
 				$format = 'Y-m-d H:i:s';
506 506
 			} else {
507 507
 				$format = 'Y-m-d 23:59:59';
508 508
 			}
509 509
 
510
-			$end_date = date( $format, $this->end_date );
510
+			$end_date = date($format, $this->end_date);
511 511
 
512 512
 			$end_where = " AND p.post_date <= '{$end_date}'";
513 513
 		}
@@ -529,34 +529,34 @@  discard block
 block discarded – undo
529 529
 	 *
530 530
 	 * @return string
531 531
 	 */
532
-	public function payments_where( $where = '' ) {
532
+	public function payments_where($where = '') {
533 533
 
534 534
 		global $wpdb;
535 535
 
536 536
 		$start_where = '';
537 537
 		$end_where   = '';
538 538
 
539
-		if ( ! is_wp_error( $this->start_date ) ) {
539
+		if ( ! is_wp_error($this->start_date)) {
540 540
 
541
-			if ( $this->timestamp ) {
541
+			if ($this->timestamp) {
542 542
 				$format = 'Y-m-d H:i:s';
543 543
 			} else {
544 544
 				$format = 'Y-m-d 00:00:00';
545 545
 			}
546 546
 
547
-			$start_date  = date( $format, $this->start_date );
547
+			$start_date  = date($format, $this->start_date);
548 548
 			$start_where = " AND $wpdb->posts.post_date >= '{$start_date}'";
549 549
 		}
550 550
 
551
-		if ( ! is_wp_error( $this->end_date ) ) {
551
+		if ( ! is_wp_error($this->end_date)) {
552 552
 
553
-			if ( $this->timestamp ) {
553
+			if ($this->timestamp) {
554 554
 				$format = 'Y-m-d H:i:s';
555 555
 			} else {
556 556
 				$format = 'Y-m-d 23:59:59';
557 557
 			}
558 558
 
559
-			$end_date = date( $format, $this->end_date );
559
+			$end_date = date($format, $this->end_date);
560 560
 
561 561
 			$end_where = " AND $wpdb->posts.post_date <= '{$end_date}'";
562 562
 		}
Please login to merge, or discard this patch.