@@ -161,7 +161,7 @@ discard block |
||
161 | 161 | * @since 1.0 |
162 | 162 | * @access public |
163 | 163 | * |
164 | - * @param bool|string|int $_id_or_email |
|
164 | + * @param integer $_id_or_email |
|
165 | 165 | * |
166 | 166 | * @return bool|int |
167 | 167 | */ |
@@ -316,7 +316,7 @@ discard block |
||
316 | 316 | * @param int $user_id User ID. |
317 | 317 | * @param WP_User|bool $old_user_data User data. |
318 | 318 | * |
319 | - * @return bool |
|
319 | + * @return false|null |
|
320 | 320 | */ |
321 | 321 | public function update_donor_email_on_user_update( $user_id = 0, $old_user_data = false ) { |
322 | 322 | |
@@ -373,7 +373,7 @@ discard block |
||
373 | 373 | * @access public |
374 | 374 | * |
375 | 375 | * @param string $field ID or email. Default is 'id'. |
376 | - * @param mixed $value The Customer ID or email to search. Default is 0. |
|
376 | + * @param integer $value The Customer ID or email to search. Default is 0. |
|
377 | 377 | * |
378 | 378 | * @return mixed Upon success, an object of the donor. Upon failure, NULL |
379 | 379 | */ |
@@ -10,7 +10,7 @@ discard block |
||
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 | |
@@ -35,14 +35,14 @@ discard block |
||
35 | 35 | /* @var WPDB $wpdb */ |
36 | 36 | global $wpdb; |
37 | 37 | |
38 | - $this->table_name = $wpdb->prefix . 'give_customers'; |
|
38 | + $this->table_name = $wpdb->prefix.'give_customers'; |
|
39 | 39 | $this->primary_key = 'id'; |
40 | 40 | $this->version = '1.0'; |
41 | 41 | |
42 | 42 | // Set hooks and register table only if instance loading first time. |
43 | - if ( ! ( Give()->donors instanceof Give_DB_Donors ) ) { |
|
43 | + if ( ! (Give()->donors instanceof Give_DB_Donors)) { |
|
44 | 44 | // Setup hook. |
45 | - add_action( 'profile_update', array( $this, 'update_donor_email_on_user_update' ), 10, 2 ); |
|
45 | + add_action('profile_update', array($this, 'update_donor_email_on_user_update'), 10, 2); |
|
46 | 46 | |
47 | 47 | // Install table. |
48 | 48 | $this->register_table(); |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | 'purchase_value' => 0.00, |
90 | 90 | 'purchase_count' => 0, |
91 | 91 | 'notes' => '', |
92 | - 'date_created' => date( 'Y-m-d H:i:s' ), |
|
92 | + 'date_created' => date('Y-m-d H:i:s'), |
|
93 | 93 | ); |
94 | 94 | } |
95 | 95 | |
@@ -103,40 +103,40 @@ discard block |
||
103 | 103 | * |
104 | 104 | * @return int|bool |
105 | 105 | */ |
106 | - public function add( $data = array() ) { |
|
106 | + public function add($data = array()) { |
|
107 | 107 | |
108 | 108 | $defaults = array( |
109 | 109 | 'payment_ids' => '', |
110 | 110 | ); |
111 | 111 | |
112 | - $args = wp_parse_args( $data, $defaults ); |
|
112 | + $args = wp_parse_args($data, $defaults); |
|
113 | 113 | |
114 | - if ( empty( $args['email'] ) ) { |
|
114 | + if (empty($args['email'])) { |
|
115 | 115 | return false; |
116 | 116 | } |
117 | 117 | |
118 | - if ( ! empty( $args['payment_ids'] ) && is_array( $args['payment_ids'] ) ) { |
|
119 | - $args['payment_ids'] = implode( ',', array_unique( array_values( $args['payment_ids'] ) ) ); |
|
118 | + if ( ! empty($args['payment_ids']) && is_array($args['payment_ids'])) { |
|
119 | + $args['payment_ids'] = implode(',', array_unique(array_values($args['payment_ids']))); |
|
120 | 120 | } |
121 | 121 | |
122 | - $donor = $this->get_donor_by( 'email', $args['email'] ); |
|
122 | + $donor = $this->get_donor_by('email', $args['email']); |
|
123 | 123 | |
124 | 124 | // update an existing donor. |
125 | - if ( $donor ) { |
|
125 | + if ($donor) { |
|
126 | 126 | |
127 | 127 | // Update the payment IDs attached to the donor |
128 | - if ( ! empty( $args['payment_ids'] ) ) { |
|
128 | + if ( ! empty($args['payment_ids'])) { |
|
129 | 129 | |
130 | - if ( empty( $donor->payment_ids ) ) { |
|
130 | + if (empty($donor->payment_ids)) { |
|
131 | 131 | |
132 | 132 | $donor->payment_ids = $args['payment_ids']; |
133 | 133 | |
134 | 134 | } else { |
135 | 135 | |
136 | - $existing_ids = array_map( 'absint', explode( ',', $donor->payment_ids ) ); |
|
137 | - $payment_ids = array_map( 'absint', explode( ',', $args['payment_ids'] ) ); |
|
138 | - $payment_ids = array_merge( $payment_ids, $existing_ids ); |
|
139 | - $donor->payment_ids = implode( ',', array_unique( array_values( $payment_ids ) ) ); |
|
136 | + $existing_ids = array_map('absint', explode(',', $donor->payment_ids)); |
|
137 | + $payment_ids = array_map('absint', explode(',', $args['payment_ids'])); |
|
138 | + $payment_ids = array_merge($payment_ids, $existing_ids); |
|
139 | + $donor->payment_ids = implode(',', array_unique(array_values($payment_ids))); |
|
140 | 140 | |
141 | 141 | } |
142 | 142 | |
@@ -144,13 +144,13 @@ discard block |
||
144 | 144 | |
145 | 145 | } |
146 | 146 | |
147 | - $this->update( $donor->id, $args ); |
|
147 | + $this->update($donor->id, $args); |
|
148 | 148 | |
149 | 149 | return $donor->id; |
150 | 150 | |
151 | 151 | } else { |
152 | 152 | |
153 | - return $this->insert( $args, 'donor' ); |
|
153 | + return $this->insert($args, 'donor'); |
|
154 | 154 | |
155 | 155 | } |
156 | 156 | |
@@ -169,16 +169,16 @@ discard block |
||
169 | 169 | * |
170 | 170 | * @return bool|int |
171 | 171 | */ |
172 | - public function delete( $_id_or_email = false ) { |
|
172 | + public function delete($_id_or_email = false) { |
|
173 | 173 | |
174 | - if ( empty( $_id_or_email ) ) { |
|
174 | + if (empty($_id_or_email)) { |
|
175 | 175 | return false; |
176 | 176 | } |
177 | 177 | |
178 | - $column = is_email( $_id_or_email ) ? 'email' : 'id'; |
|
179 | - $donor = $this->get_donor_by( $column, $_id_or_email ); |
|
178 | + $column = is_email($_id_or_email) ? 'email' : 'id'; |
|
179 | + $donor = $this->get_donor_by($column, $_id_or_email); |
|
180 | 180 | |
181 | - if ( $donor->id > 0 ) { |
|
181 | + if ($donor->id > 0) { |
|
182 | 182 | |
183 | 183 | global $wpdb; |
184 | 184 | |
@@ -187,9 +187,9 @@ discard block |
||
187 | 187 | * |
188 | 188 | * @since 1.8.14 |
189 | 189 | */ |
190 | - Give()->donor_meta->delete_all_meta( $donor->id ); |
|
190 | + Give()->donor_meta->delete_all_meta($donor->id); |
|
191 | 191 | |
192 | - return $wpdb->delete( $this->table_name, array( 'id' => $donor->id ), array( '%d' ) ); |
|
192 | + return $wpdb->delete($this->table_name, array('id' => $donor->id), array('%d')); |
|
193 | 193 | |
194 | 194 | } else { |
195 | 195 | return false; |
@@ -210,9 +210,9 @@ discard block |
||
210 | 210 | * |
211 | 211 | * @return bool|int |
212 | 212 | */ |
213 | - public function delete_by_user_id( $user_id = false ) { |
|
213 | + public function delete_by_user_id($user_id = false) { |
|
214 | 214 | |
215 | - if ( empty( $user_id ) ) { |
|
215 | + if (empty($user_id)) { |
|
216 | 216 | return false; |
217 | 217 | } |
218 | 218 | |
@@ -221,14 +221,14 @@ discard block |
||
221 | 221 | * |
222 | 222 | * @since 1.8.14 |
223 | 223 | */ |
224 | - $donor = new Give_Donor( $user_id, true ); |
|
225 | - if ( ! empty( $donor->id ) ) { |
|
226 | - Give()->donor_meta->delete_all_meta( $donor->id ); |
|
224 | + $donor = new Give_Donor($user_id, true); |
|
225 | + if ( ! empty($donor->id)) { |
|
226 | + Give()->donor_meta->delete_all_meta($donor->id); |
|
227 | 227 | } |
228 | 228 | |
229 | 229 | global $wpdb; |
230 | 230 | |
231 | - return $wpdb->delete( $this->table_name, array( 'user_id' => $user_id ), array( '%d' ) ); |
|
231 | + return $wpdb->delete($this->table_name, array('user_id' => $user_id), array('%d')); |
|
232 | 232 | } |
233 | 233 | |
234 | 234 | /** |
@@ -242,14 +242,14 @@ discard block |
||
242 | 242 | * |
243 | 243 | * @return bool True is exists, false otherwise. |
244 | 244 | */ |
245 | - public function exists( $value = '', $field = 'email' ) { |
|
245 | + public function exists($value = '', $field = 'email') { |
|
246 | 246 | |
247 | 247 | $columns = $this->get_columns(); |
248 | - if ( ! array_key_exists( $field, $columns ) ) { |
|
248 | + if ( ! array_key_exists($field, $columns)) { |
|
249 | 249 | return false; |
250 | 250 | } |
251 | 251 | |
252 | - return (bool) $this->get_column_by( 'id', $field, $value ); |
|
252 | + return (bool) $this->get_column_by('id', $field, $value); |
|
253 | 253 | |
254 | 254 | } |
255 | 255 | |
@@ -264,16 +264,16 @@ discard block |
||
264 | 264 | * |
265 | 265 | * @return bool |
266 | 266 | */ |
267 | - public function attach_payment( $donor_id = 0, $payment_id = 0 ) { |
|
267 | + public function attach_payment($donor_id = 0, $payment_id = 0) { |
|
268 | 268 | |
269 | - $donor = new Give_Donor( $donor_id ); |
|
269 | + $donor = new Give_Donor($donor_id); |
|
270 | 270 | |
271 | - if ( empty( $donor->id ) ) { |
|
271 | + if (empty($donor->id)) { |
|
272 | 272 | return false; |
273 | 273 | } |
274 | 274 | |
275 | 275 | // Attach the payment, but don't increment stats, as this function previously did not |
276 | - return $donor->attach_payment( $payment_id, false ); |
|
276 | + return $donor->attach_payment($payment_id, false); |
|
277 | 277 | |
278 | 278 | } |
279 | 279 | |
@@ -288,16 +288,16 @@ discard block |
||
288 | 288 | * |
289 | 289 | * @return bool |
290 | 290 | */ |
291 | - public function remove_payment( $donor_id = 0, $payment_id = 0 ) { |
|
291 | + public function remove_payment($donor_id = 0, $payment_id = 0) { |
|
292 | 292 | |
293 | - $donor = new Give_Donor( $donor_id ); |
|
293 | + $donor = new Give_Donor($donor_id); |
|
294 | 294 | |
295 | - if ( ! $donor ) { |
|
295 | + if ( ! $donor) { |
|
296 | 296 | return false; |
297 | 297 | } |
298 | 298 | |
299 | 299 | // Remove the payment, but don't decrease stats, as this function previously did not |
300 | - return $donor->remove_payment( $payment_id, false ); |
|
300 | + return $donor->remove_payment($payment_id, false); |
|
301 | 301 | |
302 | 302 | } |
303 | 303 | |
@@ -311,18 +311,18 @@ discard block |
||
311 | 311 | * |
312 | 312 | * @return bool |
313 | 313 | */ |
314 | - public function increment_stats( $donor_id = 0, $amount = 0.00 ) { |
|
314 | + public function increment_stats($donor_id = 0, $amount = 0.00) { |
|
315 | 315 | |
316 | - $donor = new Give_Donor( $donor_id ); |
|
316 | + $donor = new Give_Donor($donor_id); |
|
317 | 317 | |
318 | - if ( empty( $donor->id ) ) { |
|
318 | + if (empty($donor->id)) { |
|
319 | 319 | return false; |
320 | 320 | } |
321 | 321 | |
322 | 322 | $increased_count = $donor->increase_purchase_count(); |
323 | - $increased_value = $donor->increase_value( $amount ); |
|
323 | + $increased_value = $donor->increase_value($amount); |
|
324 | 324 | |
325 | - return ( $increased_count && $increased_value ) ? true : false; |
|
325 | + return ($increased_count && $increased_value) ? true : false; |
|
326 | 326 | |
327 | 327 | } |
328 | 328 | |
@@ -337,18 +337,18 @@ discard block |
||
337 | 337 | * |
338 | 338 | * @return bool |
339 | 339 | */ |
340 | - public function decrement_stats( $donor_id = 0, $amount = 0.00 ) { |
|
340 | + public function decrement_stats($donor_id = 0, $amount = 0.00) { |
|
341 | 341 | |
342 | - $donor = new Give_Donor( $donor_id ); |
|
342 | + $donor = new Give_Donor($donor_id); |
|
343 | 343 | |
344 | - if ( ! $donor ) { |
|
344 | + if ( ! $donor) { |
|
345 | 345 | return false; |
346 | 346 | } |
347 | 347 | |
348 | 348 | $decreased_count = $donor->decrease_donation_count(); |
349 | - $decreased_value = $donor->decrease_value( $amount ); |
|
349 | + $decreased_value = $donor->decrease_value($amount); |
|
350 | 350 | |
351 | - return ( $decreased_count && $decreased_value ) ? true : false; |
|
351 | + return ($decreased_count && $decreased_value) ? true : false; |
|
352 | 352 | |
353 | 353 | } |
354 | 354 | |
@@ -363,31 +363,31 @@ discard block |
||
363 | 363 | * |
364 | 364 | * @return bool |
365 | 365 | */ |
366 | - public function update_donor_email_on_user_update( $user_id = 0, $old_user_data = false ) { |
|
366 | + public function update_donor_email_on_user_update($user_id = 0, $old_user_data = false) { |
|
367 | 367 | |
368 | - $donor = new Give_Donor( $user_id, true ); |
|
368 | + $donor = new Give_Donor($user_id, true); |
|
369 | 369 | |
370 | - if ( ! $donor ) { |
|
370 | + if ( ! $donor) { |
|
371 | 371 | return false; |
372 | 372 | } |
373 | 373 | |
374 | - $user = get_userdata( $user_id ); |
|
374 | + $user = get_userdata($user_id); |
|
375 | 375 | |
376 | - if ( ! empty( $user ) && $user->user_email !== $donor->email ) { |
|
376 | + if ( ! empty($user) && $user->user_email !== $donor->email) { |
|
377 | 377 | |
378 | - if ( ! $this->get_donor_by( 'email', $user->user_email ) ) { |
|
378 | + if ( ! $this->get_donor_by('email', $user->user_email)) { |
|
379 | 379 | |
380 | - $success = $this->update( $donor->id, array( 'email' => $user->user_email ) ); |
|
380 | + $success = $this->update($donor->id, array('email' => $user->user_email)); |
|
381 | 381 | |
382 | - if ( $success ) { |
|
382 | + if ($success) { |
|
383 | 383 | // Update some payment meta if we need to |
384 | - $payments_array = explode( ',', $donor->payment_ids ); |
|
384 | + $payments_array = explode(',', $donor->payment_ids); |
|
385 | 385 | |
386 | - if ( ! empty( $payments_array ) ) { |
|
386 | + if ( ! empty($payments_array)) { |
|
387 | 387 | |
388 | - foreach ( $payments_array as $payment_id ) { |
|
388 | + foreach ($payments_array as $payment_id) { |
|
389 | 389 | |
390 | - give_update_payment_meta( $payment_id, 'email', $user->user_email ); |
|
390 | + give_update_payment_meta($payment_id, 'email', $user->user_email); |
|
391 | 391 | |
392 | 392 | } |
393 | 393 | |
@@ -401,7 +401,7 @@ discard block |
||
401 | 401 | * @param WP_User $user WordPress User object. |
402 | 402 | * @param Give_Donor $donor Give donor object. |
403 | 403 | */ |
404 | - do_action( 'give_update_donor_email_on_user_update', $user, $donor ); |
|
404 | + do_action('give_update_donor_email_on_user_update', $user, $donor); |
|
405 | 405 | |
406 | 406 | } |
407 | 407 | |
@@ -422,44 +422,44 @@ discard block |
||
422 | 422 | * |
423 | 423 | * @return mixed Upon success, an object of the donor. Upon failure, NULL |
424 | 424 | */ |
425 | - public function get_donor_by( $field = 'id', $value = 0 ) { |
|
426 | - $value = sanitize_text_field( $value ); |
|
425 | + public function get_donor_by($field = 'id', $value = 0) { |
|
426 | + $value = sanitize_text_field($value); |
|
427 | 427 | |
428 | 428 | // Bailout. |
429 | - if ( empty( $field ) || empty( $value ) ) { |
|
429 | + if (empty($field) || empty($value)) { |
|
430 | 430 | return null; |
431 | 431 | } |
432 | 432 | |
433 | 433 | // Verify values. |
434 | - if ( 'id' === $field || 'user_id' === $field ) { |
|
434 | + if ('id' === $field || 'user_id' === $field) { |
|
435 | 435 | // Make sure the value is numeric to avoid casting objects, for example, |
436 | 436 | // to int 1. |
437 | - if ( ! is_numeric( $value ) ) { |
|
437 | + if ( ! is_numeric($value)) { |
|
438 | 438 | return false; |
439 | 439 | } |
440 | 440 | |
441 | - $value = absint( $value ); |
|
441 | + $value = absint($value); |
|
442 | 442 | |
443 | - if ( $value < 1 ) { |
|
443 | + if ($value < 1) { |
|
444 | 444 | return false; |
445 | 445 | } |
446 | 446 | |
447 | - } elseif ( 'email' === $field ) { |
|
447 | + } elseif ('email' === $field) { |
|
448 | 448 | |
449 | - if ( ! is_email( $value ) ) { |
|
449 | + if ( ! is_email($value)) { |
|
450 | 450 | return false; |
451 | 451 | } |
452 | 452 | |
453 | - $value = trim( $value ); |
|
453 | + $value = trim($value); |
|
454 | 454 | } |
455 | 455 | |
456 | 456 | // Bailout |
457 | - if ( ! $value ) { |
|
457 | + if ( ! $value) { |
|
458 | 458 | return false; |
459 | 459 | } |
460 | 460 | |
461 | 461 | // Set query params. |
462 | - switch ( $field ) { |
|
462 | + switch ($field) { |
|
463 | 463 | case 'id': |
464 | 464 | $args['donor'] = $value; |
465 | 465 | break; |
@@ -474,9 +474,9 @@ discard block |
||
474 | 474 | } |
475 | 475 | |
476 | 476 | // Get donors. |
477 | - $donor = new Give_Donors_Query( $args ); |
|
477 | + $donor = new Give_Donors_Query($args); |
|
478 | 478 | |
479 | - if ( ! $donor = $donor->get_donors() ) { |
|
479 | + if ( ! $donor = $donor->get_donors()) { |
|
480 | 480 | // Look for donor from an additional email. |
481 | 481 | $args = array( |
482 | 482 | 'meta_query' => array( |
@@ -487,15 +487,15 @@ discard block |
||
487 | 487 | ), |
488 | 488 | ); |
489 | 489 | |
490 | - $donor = new Give_Donors_Query( $args ); |
|
490 | + $donor = new Give_Donors_Query($args); |
|
491 | 491 | $donor = $donor->get_donors(); |
492 | 492 | |
493 | - if ( empty( $donor ) ) { |
|
493 | + if (empty($donor)) { |
|
494 | 494 | return false; |
495 | 495 | } |
496 | 496 | } |
497 | 497 | |
498 | - return current( $donor ); |
|
498 | + return current($donor); |
|
499 | 499 | } |
500 | 500 | |
501 | 501 | /** |
@@ -508,18 +508,18 @@ discard block |
||
508 | 508 | * |
509 | 509 | * @return array|object|null Donors array or object. Null if not found. |
510 | 510 | */ |
511 | - public function get_donors( $args = array() ) { |
|
512 | - $this->bc_1814_params( $args ); |
|
511 | + public function get_donors($args = array()) { |
|
512 | + $this->bc_1814_params($args); |
|
513 | 513 | |
514 | - $cache_key = md5( 'give_donors_' . serialize( $args ) ); |
|
514 | + $cache_key = md5('give_donors_'.serialize($args)); |
|
515 | 515 | |
516 | - $donors = wp_cache_get( $cache_key, 'donors' ); |
|
516 | + $donors = wp_cache_get($cache_key, 'donors'); |
|
517 | 517 | |
518 | - if ( $donors === false ) { |
|
519 | - $donors = new Give_Donors_Query( $args ); |
|
518 | + if ($donors === false) { |
|
519 | + $donors = new Give_Donors_Query($args); |
|
520 | 520 | $donors = $donors->get_donors(); |
521 | 521 | |
522 | - wp_cache_set( $cache_key, $donors, 'donors', 3600 ); |
|
522 | + wp_cache_set($cache_key, $donors, 'donors', 3600); |
|
523 | 523 | } |
524 | 524 | |
525 | 525 | return $donors; |
@@ -537,21 +537,21 @@ discard block |
||
537 | 537 | * |
538 | 538 | * @return int Total number of donors. |
539 | 539 | */ |
540 | - public function count( $args = array() ) { |
|
541 | - $this->bc_1814_params( $args ); |
|
540 | + public function count($args = array()) { |
|
541 | + $this->bc_1814_params($args); |
|
542 | 542 | $args['count'] = true; |
543 | 543 | |
544 | - $cache_key = md5( 'give_donors_count' . serialize( $args ) ); |
|
545 | - $count = wp_cache_get( $cache_key, 'donors' ); |
|
544 | + $cache_key = md5('give_donors_count'.serialize($args)); |
|
545 | + $count = wp_cache_get($cache_key, 'donors'); |
|
546 | 546 | |
547 | - if ( $count === false ) { |
|
548 | - $donors = new Give_Donors_Query( $args ); |
|
547 | + if ($count === false) { |
|
548 | + $donors = new Give_Donors_Query($args); |
|
549 | 549 | $count = $donors->get_donors(); |
550 | 550 | |
551 | - wp_cache_set( $cache_key, $count, 'donors', 3600 ); |
|
551 | + wp_cache_set($cache_key, $count, 'donors', 3600); |
|
552 | 552 | } |
553 | 553 | |
554 | - return absint( $count ); |
|
554 | + return absint($count); |
|
555 | 555 | |
556 | 556 | } |
557 | 557 | |
@@ -565,9 +565,9 @@ discard block |
||
565 | 565 | */ |
566 | 566 | public function create_table() { |
567 | 567 | |
568 | - require_once( ABSPATH . 'wp-admin/includes/upgrade.php' ); |
|
568 | + require_once(ABSPATH.'wp-admin/includes/upgrade.php'); |
|
569 | 569 | |
570 | - $sql = "CREATE TABLE " . $this->table_name . " ( |
|
570 | + $sql = "CREATE TABLE ".$this->table_name." ( |
|
571 | 571 | id bigint(20) NOT NULL AUTO_INCREMENT, |
572 | 572 | user_id bigint(20) NOT NULL, |
573 | 573 | email varchar(50) NOT NULL, |
@@ -582,9 +582,9 @@ discard block |
||
582 | 582 | KEY user (user_id) |
583 | 583 | ) CHARACTER SET utf8 COLLATE utf8_general_ci;"; |
584 | 584 | |
585 | - dbDelta( $sql ); |
|
585 | + dbDelta($sql); |
|
586 | 586 | |
587 | - update_option( $this->table_name . '_db_version', $this->version ); |
|
587 | + update_option($this->table_name.'_db_version', $this->version); |
|
588 | 588 | } |
589 | 589 | |
590 | 590 | /** |
@@ -596,7 +596,7 @@ discard block |
||
596 | 596 | * @return bool Returns if the donors table was installed and upgrade routine run. |
597 | 597 | */ |
598 | 598 | public function installed() { |
599 | - return $this->table_exists( $this->table_name ); |
|
599 | + return $this->table_exists($this->table_name); |
|
600 | 600 | } |
601 | 601 | |
602 | 602 | /** |
@@ -607,41 +607,41 @@ discard block |
||
607 | 607 | * |
608 | 608 | * @param $args |
609 | 609 | */ |
610 | - private function bc_1814_params( &$args ) { |
|
610 | + private function bc_1814_params(&$args) { |
|
611 | 611 | // Backward compatibility: user_id |
612 | - if ( ! empty( $args['user_id'] ) ) { |
|
612 | + if ( ! empty($args['user_id'])) { |
|
613 | 613 | $args['user'] = $args['user_id']; |
614 | 614 | } |
615 | 615 | |
616 | 616 | // Backward compatibility: id |
617 | - if ( ! empty( $args['id'] ) ) { |
|
617 | + if ( ! empty($args['id'])) { |
|
618 | 618 | $args['donor'] = $args['id']; |
619 | 619 | } |
620 | 620 | |
621 | 621 | // Backward compatibility: name |
622 | - if ( ! empty( $args['name'] ) ) { |
|
622 | + if ( ! empty($args['name'])) { |
|
623 | 623 | $args['s'] = "name:{$args['name']}"; |
624 | 624 | } |
625 | 625 | |
626 | 626 | // Backward compatibility: date |
627 | 627 | // Donors created for a specific date or in a date range. |
628 | - if ( ! empty( $args['date'] ) ) { |
|
628 | + if ( ! empty($args['date'])) { |
|
629 | 629 | |
630 | - if ( is_array( $args['date'] ) ) { |
|
630 | + if (is_array($args['date'])) { |
|
631 | 631 | |
632 | - if ( ! empty( $args['date']['start'] ) ) { |
|
633 | - $args['date_query']['after'] = date( 'Y-m-d H:i:s', strtotime( $args['date']['start'] ) ); |
|
632 | + if ( ! empty($args['date']['start'])) { |
|
633 | + $args['date_query']['after'] = date('Y-m-d H:i:s', strtotime($args['date']['start'])); |
|
634 | 634 | } |
635 | 635 | |
636 | - if ( ! empty( $args['date']['end'] ) ) { |
|
637 | - $args['date_query']['before'] = date( 'Y-m-d H:i:s', strtotime( $args['date']['end'] ) ); |
|
636 | + if ( ! empty($args['date']['end'])) { |
|
637 | + $args['date_query']['before'] = date('Y-m-d H:i:s', strtotime($args['date']['end'])); |
|
638 | 638 | } |
639 | 639 | |
640 | 640 | } else { |
641 | 641 | |
642 | - $args['date_query']['year'] = date( 'Y', strtotime( $args['date'] ) ); |
|
643 | - $args['date_query']['month'] = date( 'm', strtotime( $args['date'] ) ); |
|
644 | - $args['date_query']['day'] = date( 'd', strtotime( $args['date'] ) ); |
|
642 | + $args['date_query']['year'] = date('Y', strtotime($args['date'])); |
|
643 | + $args['date_query']['month'] = date('m', strtotime($args['date'])); |
|
644 | + $args['date_query']['day'] = date('d', strtotime($args['date'])); |
|
645 | 645 | } |
646 | 646 | |
647 | 647 | } |
@@ -143,7 +143,7 @@ |
||
143 | 143 | * |
144 | 144 | * @access public |
145 | 145 | * @since 1.0 |
146 | - * @return mixed string If search is present, false otherwise |
|
146 | + * @return string|false string If search is present, false otherwise |
|
147 | 147 | */ |
148 | 148 | public function get_search() { |
149 | 149 | return ! empty( $_GET['s'] ) ? urldecode( trim( $_GET['s'] ) ) : false; |
@@ -10,13 +10,13 @@ discard block |
||
10 | 10 | */ |
11 | 11 | |
12 | 12 | // Exit if accessed directly. |
13 | -if ( ! defined( 'ABSPATH' ) ) { |
|
13 | +if ( ! defined('ABSPATH')) { |
|
14 | 14 | exit; |
15 | 15 | } |
16 | 16 | |
17 | 17 | // Load WP_List_Table if not loaded |
18 | -if ( ! class_exists( 'WP_List_Table' ) ) { |
|
19 | - require_once ABSPATH . 'wp-admin/includes/class-wp-list-table.php'; |
|
18 | +if ( ! class_exists('WP_List_Table')) { |
|
19 | + require_once ABSPATH.'wp-admin/includes/class-wp-list-table.php'; |
|
20 | 20 | } |
21 | 21 | |
22 | 22 | /** |
@@ -62,11 +62,11 @@ discard block |
||
62 | 62 | global $status, $page; |
63 | 63 | |
64 | 64 | // Set parent defaults |
65 | - parent::__construct( array( |
|
66 | - 'singular' => esc_html__( 'Donor', 'give' ), // Singular name of the listed records |
|
67 | - 'plural' => esc_html__( 'Donors', 'give' ), // Plural name of the listed records |
|
68 | - 'ajax' => false,// Does this table support ajax? |
|
69 | - ) ); |
|
65 | + parent::__construct(array( |
|
66 | + 'singular' => esc_html__('Donor', 'give'), // Singular name of the listed records |
|
67 | + 'plural' => esc_html__('Donors', 'give'), // Plural name of the listed records |
|
68 | + 'ajax' => false, // Does this table support ajax? |
|
69 | + )); |
|
70 | 70 | |
71 | 71 | } |
72 | 72 | |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | * |
84 | 84 | * @return false |
85 | 85 | */ |
86 | - public function search_box( $text, $input_id ) { |
|
86 | + public function search_box($text, $input_id) { |
|
87 | 87 | return false; |
88 | 88 | } |
89 | 89 | |
@@ -98,20 +98,20 @@ discard block |
||
98 | 98 | * |
99 | 99 | * @return void |
100 | 100 | */ |
101 | - public function give_search_box( $text, $input_id ) { |
|
102 | - $input_id = $input_id . '-search-input'; |
|
101 | + public function give_search_box($text, $input_id) { |
|
102 | + $input_id = $input_id.'-search-input'; |
|
103 | 103 | |
104 | - if ( ! empty( $_REQUEST['orderby'] ) ) { |
|
105 | - echo '<input type="hidden" name="orderby" value="' . esc_attr( $_REQUEST['orderby'] ) . '" />'; |
|
104 | + if ( ! empty($_REQUEST['orderby'])) { |
|
105 | + echo '<input type="hidden" name="orderby" value="'.esc_attr($_REQUEST['orderby']).'" />'; |
|
106 | 106 | } |
107 | - if ( ! empty( $_REQUEST['order'] ) ) { |
|
108 | - echo '<input type="hidden" name="order" value="' . esc_attr( $_REQUEST['order'] ) . '" />'; |
|
107 | + if ( ! empty($_REQUEST['order'])) { |
|
108 | + echo '<input type="hidden" name="order" value="'.esc_attr($_REQUEST['order']).'" />'; |
|
109 | 109 | } |
110 | 110 | ?> |
111 | 111 | <p class="search-box donor-search" role="search"> |
112 | 112 | <label class="screen-reader-text" for="<?php echo $input_id ?>"><?php echo $text; ?>:</label> |
113 | 113 | <input type="search" id="<?php echo $input_id ?>" name="s" value="<?php _admin_search_query(); ?>" /> |
114 | - <?php submit_button( $text, 'button', false, false, array( 'ID' => 'search-submit' ) ); ?> |
|
114 | + <?php submit_button($text, 'button', false, false, array('ID' => 'search-submit')); ?> |
|
115 | 115 | </p> |
116 | 116 | <?php |
117 | 117 | } |
@@ -124,33 +124,33 @@ discard block |
||
124 | 124 | * |
125 | 125 | * @param string $which |
126 | 126 | */ |
127 | - protected function display_tablenav( $which ) { |
|
127 | + protected function display_tablenav($which) { |
|
128 | 128 | |
129 | - if ( 'top' === $which ) { |
|
130 | - wp_nonce_field( 'bulk-' . $this->_args['plural'] ); |
|
129 | + if ('top' === $which) { |
|
130 | + wp_nonce_field('bulk-'.$this->_args['plural']); |
|
131 | 131 | } |
132 | 132 | ?> |
133 | - <div class="tablenav give-clearfix <?php echo esc_attr( $which ); ?>"> |
|
133 | + <div class="tablenav give-clearfix <?php echo esc_attr($which); ?>"> |
|
134 | 134 | |
135 | - <?php if ( 'top' === $which ) { ?> |
|
135 | + <?php if ('top' === $which) { ?> |
|
136 | 136 | <h2 class="alignleft reports-earnings-title"> |
137 | - <?php esc_html_e( 'Donors Report', 'give' ); ?> |
|
137 | + <?php esc_html_e('Donors Report', 'give'); ?> |
|
138 | 138 | </h2> |
139 | 139 | <?php } ?> |
140 | 140 | |
141 | 141 | <div class="alignright tablenav-right"> |
142 | 142 | <div class="actions bulkactions"> |
143 | 143 | <?php |
144 | - if ( 'top' === $which ) { |
|
145 | - $this->give_search_box( esc_html__( 'Search Donors', 'give' ), 'give-donors-report-search' ); |
|
144 | + if ('top' === $which) { |
|
145 | + $this->give_search_box(esc_html__('Search Donors', 'give'), 'give-donors-report-search'); |
|
146 | 146 | } |
147 | 147 | |
148 | - $this->bulk_actions( $which ); ?> |
|
148 | + $this->bulk_actions($which); ?> |
|
149 | 149 | |
150 | 150 | </div> |
151 | 151 | <?php |
152 | - $this->extra_tablenav( $which ); |
|
153 | - $this->pagination( $which ); |
|
152 | + $this->extra_tablenav($which); |
|
153 | + $this->pagination($which); |
|
154 | 154 | ?> |
155 | 155 | </div> |
156 | 156 | |
@@ -172,35 +172,35 @@ discard block |
||
172 | 172 | * |
173 | 173 | * @return string Column Name |
174 | 174 | */ |
175 | - public function column_default( $item, $column_name ) { |
|
175 | + public function column_default($item, $column_name) { |
|
176 | 176 | |
177 | - switch ( $column_name ) { |
|
177 | + switch ($column_name) { |
|
178 | 178 | |
179 | 179 | case 'name' : |
180 | - $name = '#' . $item['id'] . ' '; |
|
181 | - $name .= ! empty( $item['name'] ) ? $item['name'] : '<em>' . esc_html__( 'Unnamed Donor', 'give' ) . '</em>'; |
|
182 | - $view_url = admin_url( 'edit.php?post_type=give_forms&page=give-donors&view=overview&id=' . $item['id'] ); |
|
183 | - $value = '<a href="' . esc_url( $view_url ) . '">' . $name . '</a>'; |
|
180 | + $name = '#'.$item['id'].' '; |
|
181 | + $name .= ! empty($item['name']) ? $item['name'] : '<em>'.esc_html__('Unnamed Donor', 'give').'</em>'; |
|
182 | + $view_url = admin_url('edit.php?post_type=give_forms&page=give-donors&view=overview&id='.$item['id']); |
|
183 | + $value = '<a href="'.esc_url($view_url).'">'.$name.'</a>'; |
|
184 | 184 | break; |
185 | 185 | |
186 | 186 | case 'num_donations' : |
187 | 187 | $value = sprintf( |
188 | 188 | '<a href="%s">%s</a>', |
189 | - admin_url( 'edit.php?post_type=give_forms&page=give-payment-history&donor=' . absint( $item['id'] ) ), |
|
190 | - esc_html( $item['num_donations'] ) |
|
189 | + admin_url('edit.php?post_type=give_forms&page=give-payment-history&donor='.absint($item['id'])), |
|
190 | + esc_html($item['num_donations']) |
|
191 | 191 | ); |
192 | 192 | break; |
193 | 193 | |
194 | 194 | case 'amount_spent' : |
195 | - $value = give_currency_filter( give_format_amount( $item[ $column_name ], array( 'sanitize' => false ) ) ); |
|
195 | + $value = give_currency_filter(give_format_amount($item[$column_name], array('sanitize' => false))); |
|
196 | 196 | break; |
197 | 197 | |
198 | 198 | default: |
199 | - $value = isset( $item[ $column_name ] ) ? $item[ $column_name ] : null; |
|
199 | + $value = isset($item[$column_name]) ? $item[$column_name] : null; |
|
200 | 200 | break; |
201 | 201 | } |
202 | 202 | |
203 | - return apply_filters( "give_report_column_{$column_name}", $value, $item['id'] ); |
|
203 | + return apply_filters("give_report_column_{$column_name}", $value, $item['id']); |
|
204 | 204 | } |
205 | 205 | |
206 | 206 | /** |
@@ -212,13 +212,13 @@ discard block |
||
212 | 212 | */ |
213 | 213 | public function get_columns() { |
214 | 214 | $columns = array( |
215 | - 'name' => __( 'Name', 'give' ), |
|
216 | - 'email' => __( 'Email', 'give' ), |
|
217 | - 'num_donations' => __( 'Donations', 'give' ), |
|
218 | - 'amount_spent' => __( 'Total Donated', 'give' ), |
|
215 | + 'name' => __('Name', 'give'), |
|
216 | + 'email' => __('Email', 'give'), |
|
217 | + 'num_donations' => __('Donations', 'give'), |
|
218 | + 'amount_spent' => __('Total Donated', 'give'), |
|
219 | 219 | ); |
220 | 220 | |
221 | - return apply_filters( 'give_report_donor_columns', $columns ); |
|
221 | + return apply_filters('give_report_donor_columns', $columns); |
|
222 | 222 | |
223 | 223 | } |
224 | 224 | |
@@ -231,10 +231,10 @@ discard block |
||
231 | 231 | */ |
232 | 232 | public function get_sortable_columns() { |
233 | 233 | return array( |
234 | - 'id' => array( 'id', true ), |
|
235 | - 'name' => array( 'name', true ), |
|
236 | - 'num_donations' => array( 'purchase_count', false ), |
|
237 | - 'amount_spent' => array( 'purchase_value', false ), |
|
234 | + 'id' => array('id', true), |
|
235 | + 'name' => array('name', true), |
|
236 | + 'num_donations' => array('purchase_count', false), |
|
237 | + 'amount_spent' => array('purchase_value', false), |
|
238 | 238 | ); |
239 | 239 | } |
240 | 240 | |
@@ -245,7 +245,7 @@ discard block |
||
245 | 245 | * @since 1.0 |
246 | 246 | * @return void |
247 | 247 | */ |
248 | - public function bulk_actions( $which = '' ) { |
|
248 | + public function bulk_actions($which = '') { |
|
249 | 249 | |
250 | 250 | } |
251 | 251 | |
@@ -257,7 +257,7 @@ discard block |
||
257 | 257 | * @return int Current page number |
258 | 258 | */ |
259 | 259 | public function get_paged() { |
260 | - return isset( $_GET['paged'] ) ? absint( $_GET['paged'] ) : 1; |
|
260 | + return isset($_GET['paged']) ? absint($_GET['paged']) : 1; |
|
261 | 261 | } |
262 | 262 | |
263 | 263 | /** |
@@ -268,7 +268,7 @@ discard block |
||
268 | 268 | * @return mixed string If search is present, false otherwise |
269 | 269 | */ |
270 | 270 | public function get_search() { |
271 | - return ! empty( $_GET['s'] ) ? urldecode( trim( $_GET['s'] ) ) : false; |
|
271 | + return ! empty($_GET['s']) ? urldecode(trim($_GET['s'])) : false; |
|
272 | 272 | } |
273 | 273 | |
274 | 274 | /** |
@@ -287,15 +287,15 @@ discard block |
||
287 | 287 | |
288 | 288 | // Get donor query. |
289 | 289 | $args = $this->get_donor_query(); |
290 | - $donors = Give()->donors->get_donors( $args ); |
|
290 | + $donors = Give()->donors->get_donors($args); |
|
291 | 291 | |
292 | - if ( $donors ) { |
|
292 | + if ($donors) { |
|
293 | 293 | |
294 | - $this->count = count( $donors ); |
|
294 | + $this->count = count($donors); |
|
295 | 295 | |
296 | - foreach ( $donors as $donor ) { |
|
296 | + foreach ($donors as $donor) { |
|
297 | 297 | |
298 | - $user_id = ! empty( $donor->user_id ) ? absint( $donor->user_id ) : 0; |
|
298 | + $user_id = ! empty($donor->user_id) ? absint($donor->user_id) : 0; |
|
299 | 299 | |
300 | 300 | $data[] = array( |
301 | 301 | 'id' => $donor->id, |
@@ -323,9 +323,9 @@ discard block |
||
323 | 323 | |
324 | 324 | $_donor_query['number'] = -1; |
325 | 325 | $_donor_query['offset'] = 0; |
326 | - $donors = Give()->donors->get_donors( $_donor_query ); |
|
326 | + $donors = Give()->donors->get_donors($_donor_query); |
|
327 | 327 | |
328 | - return count( $donors ); |
|
328 | + return count($donors); |
|
329 | 329 | } |
330 | 330 | |
331 | 331 | /** |
@@ -337,10 +337,10 @@ discard block |
||
337 | 337 | */ |
338 | 338 | public function get_donor_query() { |
339 | 339 | $paged = $this->get_paged(); |
340 | - $offset = $this->per_page * ( $paged - 1 ); |
|
340 | + $offset = $this->per_page * ($paged - 1); |
|
341 | 341 | $search = $this->get_search(); |
342 | - $order = isset( $_GET['order'] ) ? sanitize_text_field( $_GET['order'] ) : 'DESC'; |
|
343 | - $orderby = isset( $_GET['orderby'] ) ? sanitize_text_field( $_GET['orderby'] ) : 'id'; |
|
342 | + $order = isset($_GET['order']) ? sanitize_text_field($_GET['order']) : 'DESC'; |
|
343 | + $orderby = isset($_GET['orderby']) ? sanitize_text_field($_GET['orderby']) : 'id'; |
|
344 | 344 | |
345 | 345 | $args = array( |
346 | 346 | 'number' => $this->per_page, |
@@ -349,10 +349,10 @@ discard block |
||
349 | 349 | 'orderby' => $orderby, |
350 | 350 | ); |
351 | 351 | |
352 | - if( $search ) { |
|
353 | - if ( is_email( $search ) ) { |
|
352 | + if ($search) { |
|
353 | + if (is_email($search)) { |
|
354 | 354 | $args['email'] = $search; |
355 | - } elseif ( is_numeric( $search ) ) { |
|
355 | + } elseif (is_numeric($search)) { |
|
356 | 356 | $args['id'] = $search; |
357 | 357 | } else { |
358 | 358 | $args['name'] = $search; |
@@ -379,16 +379,16 @@ discard block |
||
379 | 379 | $hidden = array(); // No hidden columns |
380 | 380 | $sortable = $this->get_sortable_columns(); |
381 | 381 | |
382 | - $this->_column_headers = array( $columns, $hidden, $sortable ); |
|
382 | + $this->_column_headers = array($columns, $hidden, $sortable); |
|
383 | 383 | |
384 | 384 | $this->items = $this->reports_data(); |
385 | 385 | |
386 | 386 | $this->total = $this->get_donor_count(); |
387 | 387 | |
388 | - $this->set_pagination_args( array( |
|
388 | + $this->set_pagination_args(array( |
|
389 | 389 | 'total_items' => $this->total, |
390 | 390 | 'per_page' => $this->per_page, |
391 | - 'total_pages' => ceil( $this->total / $this->per_page ), |
|
392 | - ) ); |
|
391 | + 'total_pages' => ceil($this->total / $this->per_page), |
|
392 | + )); |
|
393 | 393 | } |
394 | 394 | } |
@@ -10,13 +10,13 @@ discard block |
||
10 | 10 | */ |
11 | 11 | |
12 | 12 | // Exit if accessed directly. |
13 | -if ( ! defined( 'ABSPATH' ) ) { |
|
13 | +if ( ! defined('ABSPATH')) { |
|
14 | 14 | exit; |
15 | 15 | } |
16 | 16 | |
17 | 17 | // Load WP_List_Table if not loaded |
18 | -if ( ! class_exists( 'WP_List_Table' ) ) { |
|
19 | - require_once ABSPATH . 'wp-admin/includes/class-wp-list-table.php'; |
|
18 | +if ( ! class_exists('WP_List_Table')) { |
|
19 | + require_once ABSPATH.'wp-admin/includes/class-wp-list-table.php'; |
|
20 | 20 | } |
21 | 21 | |
22 | 22 | /** |
@@ -56,13 +56,13 @@ discard block |
||
56 | 56 | global $status, $page; |
57 | 57 | |
58 | 58 | // Set parent defaults |
59 | - parent::__construct( array( |
|
60 | - 'singular' => give_get_forms_label_singular(), // Singular name of the listed records. |
|
61 | - 'plural' => give_get_forms_label_plural(), // Plural name of the listed records. |
|
59 | + parent::__construct(array( |
|
60 | + 'singular' => give_get_forms_label_singular(), // Singular name of the listed records. |
|
61 | + 'plural' => give_get_forms_label_plural(), // Plural name of the listed records. |
|
62 | 62 | 'ajax' => false // Does this table support ajax? |
63 | - ) ); |
|
63 | + )); |
|
64 | 64 | |
65 | - add_action( 'give_report_view_actions', array( $this, 'category_filter' ) ); |
|
65 | + add_action('give_report_view_actions', array($this, 'category_filter')); |
|
66 | 66 | $this->query(); |
67 | 67 | |
68 | 68 | } |
@@ -78,32 +78,32 @@ discard block |
||
78 | 78 | * |
79 | 79 | * @return string Column Name |
80 | 80 | */ |
81 | - public function column_default( $item, $column_name ) { |
|
82 | - switch ( $column_name ) { |
|
81 | + public function column_default($item, $column_name) { |
|
82 | + switch ($column_name) { |
|
83 | 83 | case 'title': |
84 | - $title = empty( $item['title'] ) ? sprintf( __( 'Untitled (#%s)', 'give' ), $item['ID'] ) : $item['title']; |
|
84 | + $title = empty($item['title']) ? sprintf(__('Untitled (#%s)', 'give'), $item['ID']) : $item['title']; |
|
85 | 85 | |
86 | 86 | return sprintf( |
87 | 87 | '<a href="%s">%s</a>', |
88 | - get_edit_post_link( $item['ID'] ), |
|
88 | + get_edit_post_link($item['ID']), |
|
89 | 89 | $title |
90 | 90 | ); |
91 | 91 | case 'sales': |
92 | 92 | return sprintf( |
93 | 93 | '<a href="%s">%s</a>', |
94 | - admin_url( 'edit.php?post_type=give_forms&page=give-payment-history&form_id=' . urlencode( $item['ID'] ) ), |
|
94 | + admin_url('edit.php?post_type=give_forms&page=give-payment-history&form_id='.urlencode($item['ID'])), |
|
95 | 95 | $item['sales'] |
96 | 96 | ); |
97 | 97 | case 'earnings' : |
98 | - return give_currency_filter( give_format_amount( $item[ $column_name ], array( 'sanitize' => false ) ) ); |
|
98 | + return give_currency_filter(give_format_amount($item[$column_name], array('sanitize' => false))); |
|
99 | 99 | case 'average_sales' : |
100 | - return round( $item[ $column_name ] ); |
|
100 | + return round($item[$column_name]); |
|
101 | 101 | case 'average_earnings' : |
102 | - return give_currency_filter( give_format_amount( $item[ $column_name ], array( 'sanitize' => false ) ) ); |
|
102 | + return give_currency_filter(give_format_amount($item[$column_name], array('sanitize' => false))); |
|
103 | 103 | case 'details' : |
104 | - return '<a href="' . admin_url( 'edit.php?post_type=give_forms&page=give-reports&tab=forms&form-id=' . $item['ID'] ) . '">' . esc_html__( 'View Detailed Report', 'give' ) . '</a>'; |
|
104 | + return '<a href="'.admin_url('edit.php?post_type=give_forms&page=give-reports&tab=forms&form-id='.$item['ID']).'">'.esc_html__('View Detailed Report', 'give').'</a>'; |
|
105 | 105 | default: |
106 | - return $item[ $column_name ]; |
|
106 | + return $item[$column_name]; |
|
107 | 107 | } |
108 | 108 | } |
109 | 109 | |
@@ -117,12 +117,12 @@ discard block |
||
117 | 117 | */ |
118 | 118 | public function get_columns() { |
119 | 119 | $columns = array( |
120 | - 'title' => esc_html__( 'Form', 'give' ), |
|
121 | - 'sales' => esc_html__( 'Donations', 'give' ), |
|
122 | - 'earnings' => esc_html__( 'Income', 'give' ), |
|
123 | - 'average_sales' => esc_html__( 'Monthly Average Donations', 'give' ), |
|
124 | - 'average_earnings' => esc_html__( 'Monthly Average Income', 'give' ), |
|
125 | - 'details' => esc_html__( 'Detailed Report', 'give' ) |
|
120 | + 'title' => esc_html__('Form', 'give'), |
|
121 | + 'sales' => esc_html__('Donations', 'give'), |
|
122 | + 'earnings' => esc_html__('Income', 'give'), |
|
123 | + 'average_sales' => esc_html__('Monthly Average Donations', 'give'), |
|
124 | + 'average_earnings' => esc_html__('Monthly Average Income', 'give'), |
|
125 | + 'details' => esc_html__('Detailed Report', 'give') |
|
126 | 126 | ); |
127 | 127 | |
128 | 128 | return $columns; |
@@ -138,9 +138,9 @@ discard block |
||
138 | 138 | */ |
139 | 139 | public function get_sortable_columns() { |
140 | 140 | return array( |
141 | - 'title' => array( 'title', true ), |
|
142 | - 'sales' => array( 'sales', false ), |
|
143 | - 'earnings' => array( 'earnings', false ), |
|
141 | + 'title' => array('title', true), |
|
142 | + 'sales' => array('sales', false), |
|
143 | + 'earnings' => array('earnings', false), |
|
144 | 144 | ); |
145 | 145 | } |
146 | 146 | |
@@ -153,7 +153,7 @@ discard block |
||
153 | 153 | * @return int Current page number |
154 | 154 | */ |
155 | 155 | public function get_paged() { |
156 | - return isset( $_GET['paged'] ) ? absint( $_GET['paged'] ) : 1; |
|
156 | + return isset($_GET['paged']) ? absint($_GET['paged']) : 1; |
|
157 | 157 | } |
158 | 158 | |
159 | 159 | /** |
@@ -165,7 +165,7 @@ discard block |
||
165 | 165 | * @return int Category ID |
166 | 166 | */ |
167 | 167 | public function get_category() { |
168 | - return isset( $_GET['category'] ) ? absint( $_GET['category'] ) : 0; |
|
168 | + return isset($_GET['category']) ? absint($_GET['category']) : 0; |
|
169 | 169 | } |
170 | 170 | |
171 | 171 | /** |
@@ -176,7 +176,7 @@ discard block |
||
176 | 176 | * |
177 | 177 | * @return void |
178 | 178 | */ |
179 | - public function bulk_actions( $which = '' ) { |
|
179 | + public function bulk_actions($which = '') { |
|
180 | 180 | |
181 | 181 | } |
182 | 182 | |
@@ -188,27 +188,27 @@ discard block |
||
188 | 188 | * |
189 | 189 | * @param string $which |
190 | 190 | */ |
191 | - protected function display_tablenav( $which ) { |
|
191 | + protected function display_tablenav($which) { |
|
192 | 192 | |
193 | - if ( 'top' === $which ) { |
|
194 | - wp_nonce_field( 'bulk-' . $this->_args['plural'] ); |
|
193 | + if ('top' === $which) { |
|
194 | + wp_nonce_field('bulk-'.$this->_args['plural']); |
|
195 | 195 | } |
196 | 196 | ?> |
197 | - <div class="tablenav give-clearfix <?php echo esc_attr( $which ); ?>"> |
|
197 | + <div class="tablenav give-clearfix <?php echo esc_attr($which); ?>"> |
|
198 | 198 | |
199 | - <?php if ( 'top' === $which ) { ?> |
|
199 | + <?php if ('top' === $which) { ?> |
|
200 | 200 | <h2 class="alignleft reports-earnings-title"> |
201 | - <?php esc_html_e( 'Donation Forms Report', 'give' ); ?> |
|
201 | + <?php esc_html_e('Donation Forms Report', 'give'); ?> |
|
202 | 202 | </h2> |
203 | 203 | <?php } ?> |
204 | 204 | |
205 | 205 | <div class="alignright tablenav-right"> |
206 | 206 | <div class="actions bulkactions"> |
207 | - <?php $this->bulk_actions( $which ); ?> |
|
207 | + <?php $this->bulk_actions($which); ?> |
|
208 | 208 | </div> |
209 | 209 | <?php |
210 | - $this->extra_tablenav( $which ); |
|
211 | - $this->pagination( $which ); |
|
210 | + $this->extra_tablenav($which); |
|
211 | + $this->pagination($which); |
|
212 | 212 | ?> |
213 | 213 | </div> |
214 | 214 | |
@@ -228,9 +228,9 @@ discard block |
||
228 | 228 | */ |
229 | 229 | public function category_filter() { |
230 | 230 | |
231 | - $categories = get_terms( 'form_category' ); |
|
232 | - if ( $categories && ! is_wp_error( $categories ) ) { |
|
233 | - echo Give()->html->category_dropdown( 'category', $this->get_category() ); |
|
231 | + $categories = get_terms('form_category'); |
|
232 | + if ($categories && ! is_wp_error($categories)) { |
|
233 | + echo Give()->html->category_dropdown('category', $this->get_category()); |
|
234 | 234 | } |
235 | 235 | } |
236 | 236 | |
@@ -244,8 +244,8 @@ discard block |
||
244 | 244 | */ |
245 | 245 | public function query() { |
246 | 246 | |
247 | - $orderby = isset( $_GET['orderby'] ) ? $_GET['orderby'] : 'title'; |
|
248 | - $order = isset( $_GET['order'] ) ? $_GET['order'] : 'DESC'; |
|
247 | + $orderby = isset($_GET['orderby']) ? $_GET['orderby'] : 'title'; |
|
248 | + $order = isset($_GET['order']) ? $_GET['order'] : 'DESC'; |
|
249 | 249 | $category = $this->get_category(); |
250 | 250 | |
251 | 251 | $args = array( |
@@ -258,7 +258,7 @@ discard block |
||
258 | 258 | 'suppress_filters' => true |
259 | 259 | ); |
260 | 260 | |
261 | - if ( ! empty( $category ) ) { |
|
261 | + if ( ! empty($category)) { |
|
262 | 262 | $args['tax_query'] = array( |
263 | 263 | array( |
264 | 264 | 'taxonomy' => 'form_category', |
@@ -267,7 +267,7 @@ discard block |
||
267 | 267 | ); |
268 | 268 | } |
269 | 269 | |
270 | - switch ( $orderby ) : |
|
270 | + switch ($orderby) : |
|
271 | 271 | case 'title' : |
272 | 272 | $args['orderby'] = 'title'; |
273 | 273 | break; |
@@ -283,9 +283,9 @@ discard block |
||
283 | 283 | break; |
284 | 284 | endswitch; |
285 | 285 | |
286 | - $args = apply_filters( 'give_form_reports_prepare_items_args', $args, $this ); |
|
286 | + $args = apply_filters('give_form_reports_prepare_items_args', $args, $this); |
|
287 | 287 | |
288 | - $this->donation_forms = new WP_Query( $args ); |
|
288 | + $this->donation_forms = new WP_Query($args); |
|
289 | 289 | |
290 | 290 | // Store total number of donation forms count. |
291 | 291 | $this->count = $this->donation_forms->found_posts; |
@@ -305,15 +305,15 @@ discard block |
||
305 | 305 | |
306 | 306 | $give_forms = $this->donation_forms->posts; |
307 | 307 | |
308 | - if ( $give_forms ) { |
|
309 | - foreach ( $give_forms as $form ) { |
|
308 | + if ($give_forms) { |
|
309 | + foreach ($give_forms as $form) { |
|
310 | 310 | $reports_data[] = array( |
311 | 311 | 'ID' => $form, |
312 | - 'title' => get_the_title( $form ), |
|
313 | - 'sales' => give_get_form_sales_stats( $form ), |
|
314 | - 'earnings' => give_get_form_earnings_stats( $form ), |
|
315 | - 'average_sales' => give_get_average_monthly_form_sales( $form ), |
|
316 | - 'average_earnings' => give_get_average_monthly_form_earnings( $form ) |
|
312 | + 'title' => get_the_title($form), |
|
313 | + 'sales' => give_get_form_sales_stats($form), |
|
314 | + 'earnings' => give_get_form_earnings_stats($form), |
|
315 | + 'average_sales' => give_get_average_monthly_form_sales($form), |
|
316 | + 'average_earnings' => give_get_average_monthly_form_earnings($form) |
|
317 | 317 | ); |
318 | 318 | } |
319 | 319 | } |
@@ -338,14 +338,14 @@ discard block |
||
338 | 338 | $columns = $this->get_columns(); |
339 | 339 | $hidden = array(); // No hidden columns |
340 | 340 | $sortable = $this->get_sortable_columns(); |
341 | - $this->_column_headers = array( $columns, $hidden, $sortable ); |
|
341 | + $this->_column_headers = array($columns, $hidden, $sortable); |
|
342 | 342 | $this->items = $this->reports_data(); |
343 | 343 | $total_items = $this->count; |
344 | 344 | |
345 | - $this->set_pagination_args( array( |
|
345 | + $this->set_pagination_args(array( |
|
346 | 346 | 'total_items' => $total_items, |
347 | 347 | 'per_page' => $this->per_page, |
348 | - 'total_pages' => ceil( $total_items / $this->per_page ) |
|
348 | + 'total_pages' => ceil($total_items / $this->per_page) |
|
349 | 349 | ) |
350 | 350 | ); |
351 | 351 | } |
@@ -10,13 +10,13 @@ discard block |
||
10 | 10 | */ |
11 | 11 | |
12 | 12 | // Exit if accessed directly. |
13 | -if ( ! defined( 'ABSPATH' ) ) { |
|
13 | +if ( ! defined('ABSPATH')) { |
|
14 | 14 | exit; |
15 | 15 | } |
16 | 16 | |
17 | 17 | // Load WP_List_Table if not loaded |
18 | -if ( ! class_exists( 'WP_List_Table' ) ) { |
|
19 | - require_once ABSPATH . 'wp-admin/includes/class-wp-list-table.php'; |
|
18 | +if ( ! class_exists('WP_List_Table')) { |
|
19 | + require_once ABSPATH.'wp-admin/includes/class-wp-list-table.php'; |
|
20 | 20 | } |
21 | 21 | |
22 | 22 | /** |
@@ -45,11 +45,11 @@ discard block |
||
45 | 45 | global $status, $page; |
46 | 46 | |
47 | 47 | // Set parent defaults |
48 | - parent::__construct( array( |
|
49 | - 'singular' => give_get_forms_label_singular(), // Singular name of the listed records |
|
50 | - 'plural' => give_get_forms_label_plural(), // Plural name of the listed records |
|
48 | + parent::__construct(array( |
|
49 | + 'singular' => give_get_forms_label_singular(), // Singular name of the listed records |
|
50 | + 'plural' => give_get_forms_label_plural(), // Plural name of the listed records |
|
51 | 51 | 'ajax' => false // Does this table support ajax? |
52 | - ) ); |
|
52 | + )); |
|
53 | 53 | |
54 | 54 | } |
55 | 55 | |
@@ -64,10 +64,10 @@ discard block |
||
64 | 64 | * |
65 | 65 | * @return string Column Name |
66 | 66 | */ |
67 | - public function column_default( $item, $column_name ) { |
|
68 | - switch ( $column_name ) { |
|
67 | + public function column_default($item, $column_name) { |
|
68 | + switch ($column_name) { |
|
69 | 69 | default: |
70 | - return $item[ $column_name ]; |
|
70 | + return $item[$column_name]; |
|
71 | 71 | } |
72 | 72 | } |
73 | 73 | |
@@ -80,11 +80,11 @@ discard block |
||
80 | 80 | */ |
81 | 81 | public function get_columns() { |
82 | 82 | $columns = array( |
83 | - 'label' => esc_attr__( 'Gateway', 'give' ), |
|
84 | - 'complete_sales' => esc_attr__( 'Complete Payments', 'give' ), |
|
85 | - 'pending_sales' => esc_attr__( 'Pending / Failed Payments', 'give' ), |
|
86 | - 'total_sales' => esc_attr__( 'Total Payments', 'give' ), |
|
87 | - 'total_donations' => esc_attr__( 'Total Donated', 'give' ) |
|
83 | + 'label' => esc_attr__('Gateway', 'give'), |
|
84 | + 'complete_sales' => esc_attr__('Complete Payments', 'give'), |
|
85 | + 'pending_sales' => esc_attr__('Pending / Failed Payments', 'give'), |
|
86 | + 'total_sales' => esc_attr__('Total Payments', 'give'), |
|
87 | + 'total_donations' => esc_attr__('Total Donated', 'give') |
|
88 | 88 | ); |
89 | 89 | |
90 | 90 | return $columns; |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | */ |
100 | 100 | public function get_sortable_columns() { |
101 | 101 | return array( |
102 | - 'total_donations' => array( 'total_donations', false ) |
|
102 | + 'total_donations' => array('total_donations', false) |
|
103 | 103 | ); |
104 | 104 | } |
105 | 105 | |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | * @return int Current page number |
113 | 113 | */ |
114 | 114 | public function get_paged() { |
115 | - return isset( $_GET['paged'] ) ? absint( $_GET['paged'] ) : 1; |
|
115 | + return isset($_GET['paged']) ? absint($_GET['paged']) : 1; |
|
116 | 116 | } |
117 | 117 | |
118 | 118 | |
@@ -123,7 +123,7 @@ discard block |
||
123 | 123 | * @since 1.0 |
124 | 124 | * @return void |
125 | 125 | */ |
126 | - public function bulk_actions( $which = '' ) { |
|
126 | + public function bulk_actions($which = '') { |
|
127 | 127 | |
128 | 128 | } |
129 | 129 | |
@@ -135,27 +135,27 @@ discard block |
||
135 | 135 | * |
136 | 136 | * @param string $which |
137 | 137 | */ |
138 | - protected function display_tablenav( $which ) { |
|
138 | + protected function display_tablenav($which) { |
|
139 | 139 | |
140 | - if ( 'top' === $which ) { |
|
141 | - wp_nonce_field( 'bulk-' . $this->_args['plural'] ); |
|
140 | + if ('top' === $which) { |
|
141 | + wp_nonce_field('bulk-'.$this->_args['plural']); |
|
142 | 142 | } |
143 | 143 | ?> |
144 | - <div class="tablenav gateways-report-tablenav give-clearfix <?php echo esc_attr( $which ); ?>"> |
|
144 | + <div class="tablenav gateways-report-tablenav give-clearfix <?php echo esc_attr($which); ?>"> |
|
145 | 145 | |
146 | - <?php if ( 'top' === $which ) { ?> |
|
146 | + <?php if ('top' === $which) { ?> |
|
147 | 147 | <h2 class="alignleft reports-earnings-title"> |
148 | - <?php esc_html_e( 'Donation Methods Report', 'give' ); ?> |
|
148 | + <?php esc_html_e('Donation Methods Report', 'give'); ?> |
|
149 | 149 | </h2> |
150 | 150 | <?php } ?> |
151 | 151 | |
152 | 152 | <div class="alignright tablenav-right"> |
153 | 153 | <div class="actions bulkactions"> |
154 | - <?php $this->bulk_actions( $which ); ?> |
|
154 | + <?php $this->bulk_actions($which); ?> |
|
155 | 155 | </div> |
156 | 156 | <?php |
157 | - $this->extra_tablenav( $which ); |
|
158 | - $this->pagination( $which ); |
|
157 | + $this->extra_tablenav($which); |
|
158 | + $this->pagination($which); |
|
159 | 159 | ?> |
160 | 160 | </div> |
161 | 161 | |
@@ -177,17 +177,17 @@ discard block |
||
177 | 177 | * |
178 | 178 | * @return int |
179 | 179 | */ |
180 | - public function give_sort_total_donations( $old_value, $new_value ) { |
|
180 | + public function give_sort_total_donations($old_value, $new_value) { |
|
181 | 181 | // If no sort, default to label. |
182 | - $orderby = ( ! empty( $_REQUEST['orderby'] ) ) ? $_REQUEST['orderby'] : 'label'; |
|
182 | + $orderby = ( ! empty($_REQUEST['orderby'])) ? $_REQUEST['orderby'] : 'label'; |
|
183 | 183 | |
184 | 184 | //If no order, default to asc. |
185 | - $order = ( ! empty( $_REQUEST['order'] ) ) ? $_REQUEST['order'] : 'asc'; |
|
185 | + $order = ( ! empty($_REQUEST['order'])) ? $_REQUEST['order'] : 'asc'; |
|
186 | 186 | |
187 | 187 | //Determine sort order. |
188 | - $result = strcmp( $old_value[ $orderby ], $new_value[ $orderby ] ); |
|
188 | + $result = strcmp($old_value[$orderby], $new_value[$orderby]); |
|
189 | 189 | |
190 | - return ( $order === 'asc' ) ? $result : -$result; |
|
190 | + return ($order === 'asc') ? $result : -$result; |
|
191 | 191 | } |
192 | 192 | |
193 | 193 | |
@@ -204,10 +204,10 @@ discard block |
||
204 | 204 | $gateways = give_get_payment_gateways(); |
205 | 205 | $stats = new Give_Payment_Stats(); |
206 | 206 | |
207 | - foreach ( $gateways as $gateway_id => $gateway ) { |
|
207 | + foreach ($gateways as $gateway_id => $gateway) { |
|
208 | 208 | |
209 | - $complete_count = give_count_sales_by_gateway( $gateway_id, 'publish' ); |
|
210 | - $pending_count = give_count_sales_by_gateway( $gateway_id, array( 'pending', 'failed' ) ); |
|
209 | + $complete_count = give_count_sales_by_gateway($gateway_id, 'publish'); |
|
210 | + $pending_count = give_count_sales_by_gateway($gateway_id, array('pending', 'failed')); |
|
211 | 211 | |
212 | 212 | $reports_data[] = array( |
213 | 213 | 'ID' => $gateway_id, |
@@ -215,7 +215,7 @@ discard block |
||
215 | 215 | 'complete_sales' => $complete_count, |
216 | 216 | 'pending_sales' => $pending_count, |
217 | 217 | 'total_sales' => $complete_count + $pending_count, |
218 | - 'total_donations' => give_currency_filter( give_format_amount( $stats->get_earnings( 0, strtotime('04/13/2015' ), current_time('timestamp' ), $gateway_id ), array( 'sanitize' => false ) ) ), |
|
218 | + 'total_donations' => give_currency_filter(give_format_amount($stats->get_earnings(0, strtotime('04/13/2015'), current_time('timestamp'), $gateway_id), array('sanitize' => false))), |
|
219 | 219 | ); |
220 | 220 | } |
221 | 221 | |
@@ -236,11 +236,11 @@ discard block |
||
236 | 236 | $columns = $this->get_columns(); |
237 | 237 | $hidden = array(); // No hidden columns |
238 | 238 | $sortable = $this->get_sortable_columns(); |
239 | - $this->_column_headers = array( $columns, $hidden, $sortable ); |
|
239 | + $this->_column_headers = array($columns, $hidden, $sortable); |
|
240 | 240 | $this->items = $this->reports_data(); |
241 | 241 | |
242 | 242 | // Sort Array when we are sorting data in array. |
243 | - usort( $this->items, array( $this, 'give_sort_total_donations' ) ); |
|
243 | + usort($this->items, array($this, 'give_sort_total_donations')); |
|
244 | 244 | |
245 | 245 | } |
246 | 246 | } |
@@ -9,11 +9,11 @@ discard block |
||
9 | 9 | * @since 1.8 |
10 | 10 | */ |
11 | 11 | |
12 | -if ( ! defined( 'ABSPATH' ) ) { |
|
12 | +if ( ! defined('ABSPATH')) { |
|
13 | 13 | exit; // Exit if accessed directly |
14 | 14 | } |
15 | 15 | |
16 | -if ( ! class_exists( 'Give_Settings_General' ) ) : |
|
16 | +if ( ! class_exists('Give_Settings_General')) : |
|
17 | 17 | |
18 | 18 | /** |
19 | 19 | * Give_Settings_General. |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | */ |
28 | 28 | public function __construct() { |
29 | 29 | $this->id = 'general'; |
30 | - $this->label = esc_html__( 'General', 'give' ); |
|
30 | + $this->label = esc_html__('General', 'give'); |
|
31 | 31 | |
32 | 32 | $this->default_tab = 'general-settings'; |
33 | 33 | |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | $settings = array(); |
45 | 45 | $current_section = give_get_current_setting_section(); |
46 | 46 | |
47 | - switch ( $current_section ) { |
|
47 | + switch ($current_section) { |
|
48 | 48 | case 'access-control': |
49 | 49 | $settings = array( |
50 | 50 | // Section 3: Access control. |
@@ -54,47 +54,47 @@ discard block |
||
54 | 54 | ), |
55 | 55 | array( |
56 | 56 | 'id' => 'session_lifetime', |
57 | - 'name' => esc_html__( 'Session Lifetime', 'give' ), |
|
58 | - 'desc' => esc_html__( 'The length of time a user\'s session is kept alive. Give starts a new session per user upon donation. Sessions allow donors to view their donation receipts without being logged in.', 'give' ), |
|
57 | + 'name' => esc_html__('Session Lifetime', 'give'), |
|
58 | + 'desc' => esc_html__('The length of time a user\'s session is kept alive. Give starts a new session per user upon donation. Sessions allow donors to view their donation receipts without being logged in.', 'give'), |
|
59 | 59 | 'type' => 'select', |
60 | 60 | 'options' => array( |
61 | - '86400' => esc_html__( '24 Hours', 'give' ), |
|
62 | - '172800' => esc_html__( '48 Hours', 'give' ), |
|
63 | - '259200' => esc_html__( '72 Hours', 'give' ), |
|
64 | - '604800' => esc_html__( '1 Week', 'give' ), |
|
61 | + '86400' => esc_html__('24 Hours', 'give'), |
|
62 | + '172800' => esc_html__('48 Hours', 'give'), |
|
63 | + '259200' => esc_html__('72 Hours', 'give'), |
|
64 | + '604800' => esc_html__('1 Week', 'give'), |
|
65 | 65 | ) |
66 | 66 | ), |
67 | 67 | array( |
68 | - 'name' => esc_html__( 'Email Access', 'give' ), |
|
69 | - 'desc' => esc_html__( 'Would you like your donors to be able to access their donation history using only email? Donors whose sessions have expired and do not have an account may still access their donation history via a temporary email access link.', 'give' ), |
|
68 | + 'name' => esc_html__('Email Access', 'give'), |
|
69 | + 'desc' => esc_html__('Would you like your donors to be able to access their donation history using only email? Donors whose sessions have expired and do not have an account may still access their donation history via a temporary email access link.', 'give'), |
|
70 | 70 | 'id' => 'email_access', |
71 | 71 | 'type' => 'radio_inline', |
72 | 72 | 'default' => 'disabled', |
73 | 73 | 'options' => array( |
74 | - 'enabled' => __( 'Enabled', 'give' ), |
|
75 | - 'disabled' => __( 'Disabled', 'give' ), |
|
74 | + 'enabled' => __('Enabled', 'give'), |
|
75 | + 'disabled' => __('Disabled', 'give'), |
|
76 | 76 | ) |
77 | 77 | ), |
78 | 78 | array( |
79 | 79 | 'id' => 'recaptcha_key', |
80 | - 'name' => esc_html__( 'reCAPTCHA Site Key', 'give' ), |
|
80 | + 'name' => esc_html__('reCAPTCHA Site Key', 'give'), |
|
81 | 81 | /* translators: %s: https://www.google.com/recaptcha/ */ |
82 | - 'desc' => sprintf( __( 'Please paste your reCAPTCHA site key here. <br />If you would like to prevent spam on the email access form navigate to <a href="%s" target="_blank">the reCAPTCHA website</a> and sign up for an API key. The reCAPTCHA uses Google\'s user-friendly single click verification method.', 'give' ), esc_url( 'http://docs.givewp.com/recaptcha' ) ), |
|
82 | + 'desc' => sprintf(__('Please paste your reCAPTCHA site key here. <br />If you would like to prevent spam on the email access form navigate to <a href="%s" target="_blank">the reCAPTCHA website</a> and sign up for an API key. The reCAPTCHA uses Google\'s user-friendly single click verification method.', 'give'), esc_url('http://docs.givewp.com/recaptcha')), |
|
83 | 83 | 'default' => '', |
84 | 84 | 'type' => 'text' |
85 | 85 | ), |
86 | 86 | array( |
87 | 87 | 'id' => 'recaptcha_secret', |
88 | - 'name' => esc_html__( 'reCAPTCHA Secret Key', 'give' ), |
|
89 | - 'desc' => esc_html__( 'Please paste the reCAPTCHA secret key here from your reCAPTCHA API Keys panel.', 'give' ), |
|
88 | + 'name' => esc_html__('reCAPTCHA Secret Key', 'give'), |
|
89 | + 'desc' => esc_html__('Please paste the reCAPTCHA secret key here from your reCAPTCHA API Keys panel.', 'give'), |
|
90 | 90 | 'default' => '', |
91 | 91 | 'type' => 'text' |
92 | 92 | ), |
93 | 93 | array( |
94 | - 'name' => esc_html__( 'Access Control Docs Link', 'give' ), |
|
94 | + 'name' => esc_html__('Access Control Docs Link', 'give'), |
|
95 | 95 | 'id' => 'access_control_docs_link', |
96 | - 'url' => esc_url( 'http://docs.givewp.com/settings-access-control' ), |
|
97 | - 'title' => __( 'Access Control', 'give' ), |
|
96 | + 'url' => esc_url('http://docs.givewp.com/settings-access-control'), |
|
97 | + 'title' => __('Access Control', 'give'), |
|
98 | 98 | 'type' => 'give_docs_link', |
99 | 99 | ), |
100 | 100 | array( |
@@ -112,61 +112,61 @@ discard block |
||
112 | 112 | 'id' => 'give_title_general_settings_2' |
113 | 113 | ), |
114 | 114 | array( |
115 | - 'name' => esc_html__( 'Currency Settings', 'give' ), |
|
115 | + 'name' => esc_html__('Currency Settings', 'give'), |
|
116 | 116 | 'desc' => '', |
117 | 117 | 'type' => 'give_title', |
118 | 118 | 'id' => 'give_title_general_settings_2' |
119 | 119 | ), |
120 | 120 | array( |
121 | - 'name' => esc_html__( 'Currency', 'give' ), |
|
122 | - 'desc' => esc_html__( 'The donation currency. Note that some payment gateways have currency restrictions.', 'give' ), |
|
121 | + 'name' => esc_html__('Currency', 'give'), |
|
122 | + 'desc' => esc_html__('The donation currency. Note that some payment gateways have currency restrictions.', 'give'), |
|
123 | 123 | 'id' => 'currency', |
124 | 124 | 'type' => 'select', |
125 | 125 | 'options' => give_get_currencies(), |
126 | 126 | 'default' => 'USD', |
127 | 127 | ), |
128 | 128 | array( |
129 | - 'name' => esc_html__( 'Currency Position', 'give' ), |
|
130 | - 'desc' => esc_html__( 'The position of the currency symbol.', 'give' ), |
|
129 | + 'name' => esc_html__('Currency Position', 'give'), |
|
130 | + 'desc' => esc_html__('The position of the currency symbol.', 'give'), |
|
131 | 131 | 'id' => 'currency_position', |
132 | 132 | 'type' => 'select', |
133 | 133 | 'options' => array( |
134 | 134 | /* translators: %s: currency symbol */ |
135 | - 'before' => sprintf( esc_html__( 'Before - %s10', 'give' ), give_currency_symbol( give_get_currency() ) ), |
|
135 | + 'before' => sprintf(esc_html__('Before - %s10', 'give'), give_currency_symbol(give_get_currency())), |
|
136 | 136 | /* translators: %s: currency symbol */ |
137 | - 'after' => sprintf( esc_html__( 'After - 10%s', 'give' ), give_currency_symbol( give_get_currency() ) ) |
|
137 | + 'after' => sprintf(esc_html__('After - 10%s', 'give'), give_currency_symbol(give_get_currency())) |
|
138 | 138 | ), |
139 | 139 | 'default' => 'before', |
140 | 140 | ), |
141 | 141 | array( |
142 | - 'name' => esc_html__( 'Thousands Separator', 'give' ), |
|
143 | - 'desc' => esc_html__( 'The symbol (typically , or .) to separate thousands.', 'give' ), |
|
142 | + 'name' => esc_html__('Thousands Separator', 'give'), |
|
143 | + 'desc' => esc_html__('The symbol (typically , or .) to separate thousands.', 'give'), |
|
144 | 144 | 'id' => 'thousands_separator', |
145 | 145 | 'type' => 'text', |
146 | 146 | 'default' => ',', |
147 | 147 | 'css' => 'width:12em;', |
148 | 148 | ), |
149 | 149 | array( |
150 | - 'name' => esc_html__( 'Decimal Separator', 'give' ), |
|
151 | - 'desc' => esc_html__( 'The symbol (usually , or .) to separate decimal points.', 'give' ), |
|
150 | + 'name' => esc_html__('Decimal Separator', 'give'), |
|
151 | + 'desc' => esc_html__('The symbol (usually , or .) to separate decimal points.', 'give'), |
|
152 | 152 | 'id' => 'decimal_separator', |
153 | 153 | 'type' => 'text', |
154 | 154 | 'default' => '.', |
155 | 155 | 'css' => 'width:12em;', |
156 | 156 | ), |
157 | 157 | array( |
158 | - 'name' => __( 'Number of Decimals', 'give' ), |
|
159 | - 'desc' => __( 'The number of decimal points displayed in amounts.', 'give' ), |
|
158 | + 'name' => __('Number of Decimals', 'give'), |
|
159 | + 'desc' => __('The number of decimal points displayed in amounts.', 'give'), |
|
160 | 160 | 'id' => 'number_decimals', |
161 | 161 | 'type' => 'text', |
162 | 162 | 'default' => 2, |
163 | 163 | 'css' => 'width:12em;', |
164 | 164 | ), |
165 | 165 | array( |
166 | - 'name' => esc_html__( 'Currency Options Docs Link', 'give' ), |
|
166 | + 'name' => esc_html__('Currency Options Docs Link', 'give'), |
|
167 | 167 | 'id' => 'currency_settings_docs_link', |
168 | - 'url' => esc_url( 'http://docs.givewp.com/settings-currency' ), |
|
169 | - 'title' => __( 'Currency Settings', 'give' ), |
|
168 | + 'url' => esc_url('http://docs.givewp.com/settings-currency'), |
|
169 | + 'title' => __('Currency Settings', 'give'), |
|
170 | 170 | 'type' => 'give_docs_link', |
171 | 171 | ), |
172 | 172 | array( |
@@ -181,7 +181,7 @@ discard block |
||
181 | 181 | $country = give_get_country(); |
182 | 182 | |
183 | 183 | // get the list of the states of which defalut country is selected |
184 | - $states = give_get_states( $country ); |
|
184 | + $states = give_get_states($country); |
|
185 | 185 | |
186 | 186 | // Get the country list that does not have any states init. |
187 | 187 | $no_states_country = give_no_states_country_list(); |
@@ -193,46 +193,46 @@ discard block |
||
193 | 193 | 'id' => 'give_title_general_settings_1' |
194 | 194 | ), |
195 | 195 | array( |
196 | - 'name' => esc_html__( 'General Settings', 'give' ), |
|
196 | + 'name' => esc_html__('General Settings', 'give'), |
|
197 | 197 | 'desc' => '', |
198 | 198 | 'type' => 'give_title', |
199 | 199 | 'id' => 'give_title_general_settings_1' |
200 | 200 | ), |
201 | 201 | array( |
202 | - 'name' => esc_html__( 'Success Page', 'give' ), |
|
202 | + 'name' => esc_html__('Success Page', 'give'), |
|
203 | 203 | /* translators: %s: [give_receipt] */ |
204 | - 'desc' => sprintf( __( 'The page donors are sent to after completing their donations. The %s shortcode should be on this page.', 'give' ), '<code>[give_receipt]</code>' ), |
|
204 | + 'desc' => sprintf(__('The page donors are sent to after completing their donations. The %s shortcode should be on this page.', 'give'), '<code>[give_receipt]</code>'), |
|
205 | 205 | 'id' => 'success_page', |
206 | 206 | 'type' => 'select', |
207 | - 'options' => give_cmb2_get_post_options( array( |
|
207 | + 'options' => give_cmb2_get_post_options(array( |
|
208 | 208 | 'post_type' => 'page', |
209 | - 'numberposts' => - 1 |
|
210 | - ) ), |
|
209 | + 'numberposts' => -1 |
|
210 | + )), |
|
211 | 211 | ), |
212 | 212 | array( |
213 | - 'name' => esc_html__( 'Failed Donation Page', 'give' ), |
|
214 | - 'desc' => esc_html__( 'The page donors are sent to if their donation is cancelled or fails.', 'give' ), |
|
213 | + 'name' => esc_html__('Failed Donation Page', 'give'), |
|
214 | + 'desc' => esc_html__('The page donors are sent to if their donation is cancelled or fails.', 'give'), |
|
215 | 215 | 'id' => 'failure_page', |
216 | 216 | 'type' => 'select', |
217 | - 'options' => give_cmb2_get_post_options( array( |
|
217 | + 'options' => give_cmb2_get_post_options(array( |
|
218 | 218 | 'post_type' => 'page', |
219 | - 'numberposts' => - 1 |
|
220 | - ) ), |
|
219 | + 'numberposts' => -1 |
|
220 | + )), |
|
221 | 221 | ), |
222 | 222 | array( |
223 | - 'name' => esc_html__( 'Donation History Page', 'give' ), |
|
223 | + 'name' => esc_html__('Donation History Page', 'give'), |
|
224 | 224 | /* translators: %s: [donation_history] */ |
225 | - 'desc' => sprintf( __( 'The page showing a complete donation history for the current user. The %s shortcode should be on this page.', 'give' ), '<code>[donation_history]</code>' ), |
|
225 | + 'desc' => sprintf(__('The page showing a complete donation history for the current user. The %s shortcode should be on this page.', 'give'), '<code>[donation_history]</code>'), |
|
226 | 226 | 'id' => 'history_page', |
227 | 227 | 'type' => 'select', |
228 | - 'options' => give_cmb2_get_post_options( array( |
|
228 | + 'options' => give_cmb2_get_post_options(array( |
|
229 | 229 | 'post_type' => 'page', |
230 | - 'numberposts' => - 1 |
|
231 | - ) ), |
|
230 | + 'numberposts' => -1 |
|
231 | + )), |
|
232 | 232 | ), |
233 | 233 | array( |
234 | - 'name' => esc_html__( 'Base Country', 'give' ), |
|
235 | - 'desc' => esc_html__( 'The country your site operates from.', 'give' ), |
|
234 | + 'name' => esc_html__('Base Country', 'give'), |
|
235 | + 'desc' => esc_html__('The country your site operates from.', 'give'), |
|
236 | 236 | 'id' => 'base_country', |
237 | 237 | 'type' => 'select', |
238 | 238 | 'options' => give_get_country_list(), |
@@ -243,18 +243,18 @@ discard block |
||
243 | 243 | * @since 1.8.14 |
244 | 244 | */ |
245 | 245 | array( |
246 | - 'wrapper_class' => ( array_key_exists( $country, $no_states_country ) ? 'give-hidden' : '' ), |
|
247 | - 'name' => __( 'Base State/Province', 'give' ), |
|
248 | - 'desc' => __( 'The state/province your site operates from.', 'give' ), |
|
246 | + 'wrapper_class' => (array_key_exists($country, $no_states_country) ? 'give-hidden' : ''), |
|
247 | + 'name' => __('Base State/Province', 'give'), |
|
248 | + 'desc' => __('The state/province your site operates from.', 'give'), |
|
249 | 249 | 'id' => 'base_state', |
250 | - 'type' => ( empty( $states ) ? 'text' : 'select' ), |
|
250 | + 'type' => (empty($states) ? 'text' : 'select'), |
|
251 | 251 | 'options' => $states, |
252 | 252 | ), |
253 | 253 | array( |
254 | - 'name' => esc_html__( 'General Options Docs Link', 'give' ), |
|
254 | + 'name' => esc_html__('General Options Docs Link', 'give'), |
|
255 | 255 | 'id' => 'general_options_docs_link', |
256 | - 'url' => esc_url( 'http://docs.givewp.com/settings-general' ), |
|
257 | - 'title' => __( 'General Options', 'give' ), |
|
256 | + 'url' => esc_url('http://docs.givewp.com/settings-general'), |
|
257 | + 'title' => __('General Options', 'give'), |
|
258 | 258 | 'type' => 'give_docs_link', |
259 | 259 | ), |
260 | 260 | array( |
@@ -269,7 +269,7 @@ discard block |
||
269 | 269 | * Filter the general settings. |
270 | 270 | * Backward compatibility: Please do not use this filter. This filter is deprecated in 1.8 |
271 | 271 | */ |
272 | - $settings = apply_filters( 'give_settings_general', $settings ); |
|
272 | + $settings = apply_filters('give_settings_general', $settings); |
|
273 | 273 | |
274 | 274 | /** |
275 | 275 | * Filter the settings. |
@@ -278,7 +278,7 @@ discard block |
||
278 | 278 | * |
279 | 279 | * @param array $settings |
280 | 280 | */ |
281 | - $settings = apply_filters( 'give_get_settings_' . $this->id, $settings ); |
|
281 | + $settings = apply_filters('give_get_settings_'.$this->id, $settings); |
|
282 | 282 | |
283 | 283 | // Output. |
284 | 284 | return $settings; |
@@ -292,12 +292,12 @@ discard block |
||
292 | 292 | */ |
293 | 293 | public function get_sections() { |
294 | 294 | $sections = array( |
295 | - 'general-settings' => esc_html__( 'General', 'give' ), |
|
296 | - 'currency-settings' => esc_html__( 'Currency', 'give' ), |
|
297 | - 'access-control' => esc_html__( 'Access Control', 'give' ) |
|
295 | + 'general-settings' => esc_html__('General', 'give'), |
|
296 | + 'currency-settings' => esc_html__('Currency', 'give'), |
|
297 | + 'access-control' => esc_html__('Access Control', 'give') |
|
298 | 298 | ); |
299 | 299 | |
300 | - return apply_filters( 'give_get_sections_' . $this->id, $sections ); |
|
300 | + return apply_filters('give_get_sections_'.$this->id, $sections); |
|
301 | 301 | } |
302 | 302 | } |
303 | 303 |
@@ -10,7 +10,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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,13 +678,13 @@ discard block |
||
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 | - 'label' => __( 'Region', 'give' ), |
|
687 | + 'label' => __('Region', 'give'), |
|
688 | 688 | ), |
689 | 689 | ), |
690 | 690 | 'NO' => array( |
@@ -695,7 +695,7 @@ discard block |
||
695 | 695 | ), |
696 | 696 | 'NP' => array( |
697 | 697 | 'state' => array( |
698 | - 'label' => __( 'State / Zone', 'give' ), |
|
698 | + 'label' => __('State / Zone', 'give'), |
|
699 | 699 | ), |
700 | 700 | ), |
701 | 701 | 'PL' => array( |
@@ -739,12 +739,12 @@ discard block |
||
739 | 739 | ), |
740 | 740 | 'ES' => array( |
741 | 741 | 'state' => array( |
742 | - 'label' => __( 'Province', 'give' ), |
|
742 | + 'label' => __('Province', 'give'), |
|
743 | 743 | ), |
744 | 744 | ), |
745 | 745 | 'LI' => array( |
746 | 746 | 'state' => array( |
747 | - 'label' => __( 'Municipality', 'give' ), |
|
747 | + 'label' => __('Municipality', 'give'), |
|
748 | 748 | 'required' => false, |
749 | 749 | 'hidden' => true, |
750 | 750 | ), |
@@ -762,17 +762,17 @@ discard block |
||
762 | 762 | ), |
763 | 763 | 'TR' => array( |
764 | 764 | 'state' => array( |
765 | - 'label' => __( 'Province', 'give' ), |
|
765 | + 'label' => __('Province', 'give'), |
|
766 | 766 | ), |
767 | 767 | ), |
768 | 768 | 'US' => array( |
769 | 769 | 'state' => array( |
770 | - 'label' => __( 'State', 'give' ), |
|
770 | + 'label' => __('State', 'give'), |
|
771 | 771 | ), |
772 | 772 | ), |
773 | 773 | 'GB' => array( |
774 | 774 | 'state' => array( |
775 | - 'label' => __( 'County', 'give' ), |
|
775 | + 'label' => __('County', 'give'), |
|
776 | 776 | 'required' => false, |
777 | 777 | ), |
778 | 778 | ), |
@@ -789,10 +789,10 @@ discard block |
||
789 | 789 | ), |
790 | 790 | 'ZA' => array( |
791 | 791 | 'state' => array( |
792 | - 'label' => __( 'Province', 'give' ), |
|
792 | + 'label' => __('Province', 'give'), |
|
793 | 793 | ), |
794 | 794 | ), |
795 | - ) ); |
|
795 | + )); |
|
796 | 796 | } |
797 | 797 | |
798 | 798 | /** |
@@ -804,90 +804,90 @@ discard block |
||
804 | 804 | function give_get_turkey_states_list() { |
805 | 805 | $states = array( |
806 | 806 | '' => '', |
807 | - 'TR01' => __( 'Adana', 'give' ), |
|
808 | - 'TR02' => __( 'Adıyaman', 'give' ), |
|
809 | - 'TR03' => __( 'Afyon', 'give' ), |
|
810 | - 'TR04' => __( 'Ağrı', 'give' ), |
|
811 | - 'TR05' => __( 'Amasya', 'give' ), |
|
812 | - 'TR06' => __( 'Ankara', 'give' ), |
|
813 | - 'TR07' => __( 'Antalya', 'give' ), |
|
814 | - 'TR08' => __( 'Artvin', 'give' ), |
|
815 | - 'TR09' => __( 'Aydın', 'give' ), |
|
816 | - 'TR10' => __( 'Balıkesir', 'give' ), |
|
817 | - 'TR11' => __( 'Bilecik', 'give' ), |
|
818 | - 'TR12' => __( 'Bingöl', 'give' ), |
|
819 | - 'TR13' => __( 'Bitlis', 'give' ), |
|
820 | - 'TR14' => __( 'Bolu', 'give' ), |
|
821 | - 'TR15' => __( 'Burdur', 'give' ), |
|
822 | - 'TR16' => __( 'Bursa', 'give' ), |
|
823 | - 'TR17' => __( 'Çanakkale', 'give' ), |
|
824 | - 'TR18' => __( 'Çankırı', 'give' ), |
|
825 | - 'TR19' => __( 'Çorum', 'give' ), |
|
826 | - 'TR20' => __( 'Denizli', 'give' ), |
|
827 | - 'TR21' => __( 'Diyarbakır', 'give' ), |
|
828 | - 'TR22' => __( 'Edirne', 'give' ), |
|
829 | - 'TR23' => __( 'Elazığ', 'give' ), |
|
830 | - 'TR24' => __( 'Erzincan', 'give' ), |
|
831 | - 'TR25' => __( 'Erzurum', 'give' ), |
|
832 | - 'TR26' => __( 'Eskişehir', 'give' ), |
|
833 | - 'TR27' => __( 'Gaziantep', 'give' ), |
|
834 | - 'TR28' => __( 'Giresun', 'give' ), |
|
835 | - 'TR29' => __( 'Gümüşhane', 'give' ), |
|
836 | - 'TR30' => __( 'Hakkari', 'give' ), |
|
837 | - 'TR31' => __( 'Hatay', 'give' ), |
|
838 | - 'TR32' => __( 'Isparta', 'give' ), |
|
839 | - 'TR33' => __( 'İçel', 'give' ), |
|
840 | - 'TR34' => __( 'İstanbul', 'give' ), |
|
841 | - 'TR35' => __( 'İzmir', 'give' ), |
|
842 | - 'TR36' => __( 'Kars', 'give' ), |
|
843 | - 'TR37' => __( 'Kastamonu', 'give' ), |
|
844 | - 'TR38' => __( 'Kayseri', 'give' ), |
|
845 | - 'TR39' => __( 'Kırklareli', 'give' ), |
|
846 | - 'TR40' => __( 'Kırşehir', 'give' ), |
|
847 | - 'TR41' => __( 'Kocaeli', 'give' ), |
|
848 | - 'TR42' => __( 'Konya', 'give' ), |
|
849 | - 'TR43' => __( 'Kütahya', 'give' ), |
|
850 | - 'TR44' => __( 'Malatya', 'give' ), |
|
851 | - 'TR45' => __( 'Manisa', 'give' ), |
|
852 | - 'TR46' => __( 'Kahramanmaraş', 'give' ), |
|
853 | - 'TR47' => __( 'Mardin', 'give' ), |
|
854 | - 'TR48' => __( 'Muğla', 'give' ), |
|
855 | - 'TR49' => __( 'Muş', 'give' ), |
|
856 | - 'TR50' => __( 'Nevşehir', 'give' ), |
|
857 | - 'TR51' => __( 'Niğde', 'give' ), |
|
858 | - 'TR52' => __( 'Ordu', 'give' ), |
|
859 | - 'TR53' => __( 'Rize', 'give' ), |
|
860 | - 'TR54' => __( 'Sakarya', 'give' ), |
|
861 | - 'TR55' => __( 'Samsun', 'give' ), |
|
862 | - 'TR56' => __( 'Siirt', 'give' ), |
|
863 | - 'TR57' => __( 'Sinop', 'give' ), |
|
864 | - 'TR58' => __( 'Sivas', 'give' ), |
|
865 | - 'TR59' => __( 'Tekirdağ', 'give' ), |
|
866 | - 'TR60' => __( 'Tokat', 'give' ), |
|
867 | - 'TR61' => __( 'Trabzon', 'give' ), |
|
868 | - 'TR62' => __( 'Tunceli', 'give' ), |
|
869 | - 'TR63' => __( 'Şanlıurfa', 'give' ), |
|
870 | - 'TR64' => __( 'Uşak', 'give' ), |
|
871 | - 'TR65' => __( 'Van', 'give' ), |
|
872 | - 'TR66' => __( 'Yozgat', 'give' ), |
|
873 | - 'TR67' => __( 'Zonguldak', 'give' ), |
|
874 | - 'TR68' => __( 'Aksaray', 'give' ), |
|
875 | - 'TR69' => __( 'Bayburt', 'give' ), |
|
876 | - 'TR70' => __( 'Karaman', 'give' ), |
|
877 | - 'TR71' => __( 'Kırıkkale', 'give' ), |
|
878 | - 'TR72' => __( 'Batman', 'give' ), |
|
879 | - 'TR73' => __( 'Şırnak', 'give' ), |
|
880 | - 'TR74' => __( 'Bartın', 'give' ), |
|
881 | - 'TR75' => __( 'Ardahan', 'give' ), |
|
882 | - 'TR76' => __( 'Iğdır', 'give' ), |
|
883 | - 'TR77' => __( 'Yalova', 'give' ), |
|
884 | - 'TR78' => __( 'Karabük', 'give' ), |
|
885 | - 'TR79' => __( 'Kilis', 'give' ), |
|
886 | - 'TR80' => __( 'Osmaniye', 'give' ), |
|
887 | - 'TR81' => __( 'Düzce', 'give' ), |
|
807 | + 'TR01' => __('Adana', 'give'), |
|
808 | + 'TR02' => __('Adıyaman', 'give'), |
|
809 | + 'TR03' => __('Afyon', 'give'), |
|
810 | + 'TR04' => __('Ağrı', 'give'), |
|
811 | + 'TR05' => __('Amasya', 'give'), |
|
812 | + 'TR06' => __('Ankara', 'give'), |
|
813 | + 'TR07' => __('Antalya', 'give'), |
|
814 | + 'TR08' => __('Artvin', 'give'), |
|
815 | + 'TR09' => __('Aydın', 'give'), |
|
816 | + 'TR10' => __('Balıkesir', 'give'), |
|
817 | + 'TR11' => __('Bilecik', 'give'), |
|
818 | + 'TR12' => __('Bingöl', 'give'), |
|
819 | + 'TR13' => __('Bitlis', 'give'), |
|
820 | + 'TR14' => __('Bolu', 'give'), |
|
821 | + 'TR15' => __('Burdur', 'give'), |
|
822 | + 'TR16' => __('Bursa', 'give'), |
|
823 | + 'TR17' => __('Çanakkale', 'give'), |
|
824 | + 'TR18' => __('Çankırı', 'give'), |
|
825 | + 'TR19' => __('Çorum', 'give'), |
|
826 | + 'TR20' => __('Denizli', 'give'), |
|
827 | + 'TR21' => __('Diyarbakır', 'give'), |
|
828 | + 'TR22' => __('Edirne', 'give'), |
|
829 | + 'TR23' => __('Elazığ', 'give'), |
|
830 | + 'TR24' => __('Erzincan', 'give'), |
|
831 | + 'TR25' => __('Erzurum', 'give'), |
|
832 | + 'TR26' => __('Eskişehir', 'give'), |
|
833 | + 'TR27' => __('Gaziantep', 'give'), |
|
834 | + 'TR28' => __('Giresun', 'give'), |
|
835 | + 'TR29' => __('Gümüşhane', 'give'), |
|
836 | + 'TR30' => __('Hakkari', 'give'), |
|
837 | + 'TR31' => __('Hatay', 'give'), |
|
838 | + 'TR32' => __('Isparta', 'give'), |
|
839 | + 'TR33' => __('İçel', 'give'), |
|
840 | + 'TR34' => __('İstanbul', 'give'), |
|
841 | + 'TR35' => __('İzmir', 'give'), |
|
842 | + 'TR36' => __('Kars', 'give'), |
|
843 | + 'TR37' => __('Kastamonu', 'give'), |
|
844 | + 'TR38' => __('Kayseri', 'give'), |
|
845 | + 'TR39' => __('Kırklareli', 'give'), |
|
846 | + 'TR40' => __('Kırşehir', 'give'), |
|
847 | + 'TR41' => __('Kocaeli', 'give'), |
|
848 | + 'TR42' => __('Konya', 'give'), |
|
849 | + 'TR43' => __('Kütahya', 'give'), |
|
850 | + 'TR44' => __('Malatya', 'give'), |
|
851 | + 'TR45' => __('Manisa', 'give'), |
|
852 | + 'TR46' => __('Kahramanmaraş', 'give'), |
|
853 | + 'TR47' => __('Mardin', 'give'), |
|
854 | + 'TR48' => __('Muğla', 'give'), |
|
855 | + 'TR49' => __('Muş', 'give'), |
|
856 | + 'TR50' => __('Nevşehir', 'give'), |
|
857 | + 'TR51' => __('Niğde', 'give'), |
|
858 | + 'TR52' => __('Ordu', 'give'), |
|
859 | + 'TR53' => __('Rize', 'give'), |
|
860 | + 'TR54' => __('Sakarya', 'give'), |
|
861 | + 'TR55' => __('Samsun', 'give'), |
|
862 | + 'TR56' => __('Siirt', 'give'), |
|
863 | + 'TR57' => __('Sinop', 'give'), |
|
864 | + 'TR58' => __('Sivas', 'give'), |
|
865 | + 'TR59' => __('Tekirdağ', 'give'), |
|
866 | + 'TR60' => __('Tokat', 'give'), |
|
867 | + 'TR61' => __('Trabzon', 'give'), |
|
868 | + 'TR62' => __('Tunceli', 'give'), |
|
869 | + 'TR63' => __('Şanlıurfa', 'give'), |
|
870 | + 'TR64' => __('Uşak', 'give'), |
|
871 | + 'TR65' => __('Van', 'give'), |
|
872 | + 'TR66' => __('Yozgat', 'give'), |
|
873 | + 'TR67' => __('Zonguldak', 'give'), |
|
874 | + 'TR68' => __('Aksaray', 'give'), |
|
875 | + 'TR69' => __('Bayburt', 'give'), |
|
876 | + 'TR70' => __('Karaman', 'give'), |
|
877 | + 'TR71' => __('Kırıkkale', 'give'), |
|
878 | + 'TR72' => __('Batman', 'give'), |
|
879 | + 'TR73' => __('Şırnak', 'give'), |
|
880 | + 'TR74' => __('Bartın', 'give'), |
|
881 | + 'TR75' => __('Ardahan', 'give'), |
|
882 | + 'TR76' => __('Iğdır', 'give'), |
|
883 | + 'TR77' => __('Yalova', 'give'), |
|
884 | + 'TR78' => __('Karabük', 'give'), |
|
885 | + 'TR79' => __('Kilis', 'give'), |
|
886 | + 'TR80' => __('Osmaniye', 'give'), |
|
887 | + 'TR81' => __('Düzce', 'give'), |
|
888 | 888 | ); |
889 | 889 | |
890 | - return apply_filters( 'give_turkey_states', $states ); |
|
890 | + return apply_filters('give_turkey_states', $states); |
|
891 | 891 | } |
892 | 892 | |
893 | 893 | /** |
@@ -899,51 +899,51 @@ discard block |
||
899 | 899 | function give_get_romania_states_list() { |
900 | 900 | $states = array( |
901 | 901 | '' => '', |
902 | - 'AB' => __( 'Alba', 'give' ), |
|
903 | - 'AR' => __( 'Arad', 'give' ), |
|
904 | - 'AG' => __( 'Arges', 'give' ), |
|
905 | - 'BC' => __( 'Bacau', 'give' ), |
|
906 | - 'BH' => __( 'Bihor', 'give' ), |
|
907 | - 'BN' => __( 'Bistrita-Nasaud', 'give' ), |
|
908 | - 'BT' => __( 'Botosani', 'give' ), |
|
909 | - 'BR' => __( 'Braila', 'give' ), |
|
910 | - 'BV' => __( 'Brasov', 'give' ), |
|
911 | - 'B' => __( 'Bucuresti', 'give' ), |
|
912 | - 'BZ' => __( 'Buzau', 'give' ), |
|
913 | - 'CL' => __( 'Calarasi', 'give' ), |
|
914 | - 'CS' => __( 'Caras-Severin', 'give' ), |
|
915 | - 'CJ' => __( 'Cluj', 'give' ), |
|
916 | - 'CT' => __( 'Constanta', 'give' ), |
|
917 | - 'CV' => __( 'Covasna', 'give' ), |
|
918 | - 'DB' => __( 'Dambovita', 'give' ), |
|
919 | - 'DJ' => __( 'Dolj', 'give' ), |
|
920 | - 'GL' => __( 'Galati', 'give' ), |
|
921 | - 'GR' => __( 'Giurgiu', 'give' ), |
|
922 | - 'GJ' => __( 'Gorj', 'give' ), |
|
923 | - 'HR' => __( 'Harghita', 'give' ), |
|
924 | - 'HD' => __( 'Hunedoara', 'give' ), |
|
925 | - 'IL' => __( 'Ialomita', 'give' ), |
|
926 | - 'IS' => __( 'Iasi', 'give' ), |
|
927 | - 'IF' => __( 'Ilfov', 'give' ), |
|
928 | - 'MM' => __( 'Maramures', 'give' ), |
|
929 | - 'MH' => __( 'Mehedinti', 'give' ), |
|
930 | - 'MS' => __( 'Mures', 'give' ), |
|
931 | - 'NT' => __( 'Neamt', 'give' ), |
|
932 | - 'OT' => __( 'Olt', 'give' ), |
|
933 | - 'PH' => __( 'Prahova', 'give' ), |
|
934 | - 'SJ' => __( 'Salaj', 'give' ), |
|
935 | - 'SM' => __( 'Satu Mare', 'give' ), |
|
936 | - 'SB' => __( 'Sibiu', 'give' ), |
|
937 | - 'SV' => __( 'Suceava', 'give' ), |
|
938 | - 'TR' => __( 'Teleorman', 'give' ), |
|
939 | - 'TM' => __( 'Timis', 'give' ), |
|
940 | - 'TL' => __( 'Tulcea', 'give' ), |
|
941 | - 'VL' => __( 'Valcea', 'give' ), |
|
942 | - 'VS' => __( 'Vaslui', 'give' ), |
|
943 | - 'VN' => __( 'Vrancea', 'give' ), |
|
902 | + 'AB' => __('Alba', 'give'), |
|
903 | + 'AR' => __('Arad', 'give'), |
|
904 | + 'AG' => __('Arges', 'give'), |
|
905 | + 'BC' => __('Bacau', 'give'), |
|
906 | + 'BH' => __('Bihor', 'give'), |
|
907 | + 'BN' => __('Bistrita-Nasaud', 'give'), |
|
908 | + 'BT' => __('Botosani', 'give'), |
|
909 | + 'BR' => __('Braila', 'give'), |
|
910 | + 'BV' => __('Brasov', 'give'), |
|
911 | + 'B' => __('Bucuresti', 'give'), |
|
912 | + 'BZ' => __('Buzau', 'give'), |
|
913 | + 'CL' => __('Calarasi', 'give'), |
|
914 | + 'CS' => __('Caras-Severin', 'give'), |
|
915 | + 'CJ' => __('Cluj', 'give'), |
|
916 | + 'CT' => __('Constanta', 'give'), |
|
917 | + 'CV' => __('Covasna', 'give'), |
|
918 | + 'DB' => __('Dambovita', 'give'), |
|
919 | + 'DJ' => __('Dolj', 'give'), |
|
920 | + 'GL' => __('Galati', 'give'), |
|
921 | + 'GR' => __('Giurgiu', 'give'), |
|
922 | + 'GJ' => __('Gorj', 'give'), |
|
923 | + 'HR' => __('Harghita', 'give'), |
|
924 | + 'HD' => __('Hunedoara', 'give'), |
|
925 | + 'IL' => __('Ialomita', 'give'), |
|
926 | + 'IS' => __('Iasi', 'give'), |
|
927 | + 'IF' => __('Ilfov', 'give'), |
|
928 | + 'MM' => __('Maramures', 'give'), |
|
929 | + 'MH' => __('Mehedinti', 'give'), |
|
930 | + 'MS' => __('Mures', 'give'), |
|
931 | + 'NT' => __('Neamt', 'give'), |
|
932 | + 'OT' => __('Olt', 'give'), |
|
933 | + 'PH' => __('Prahova', 'give'), |
|
934 | + 'SJ' => __('Salaj', 'give'), |
|
935 | + 'SM' => __('Satu Mare', 'give'), |
|
936 | + 'SB' => __('Sibiu', 'give'), |
|
937 | + 'SV' => __('Suceava', 'give'), |
|
938 | + 'TR' => __('Teleorman', 'give'), |
|
939 | + 'TM' => __('Timis', 'give'), |
|
940 | + 'TL' => __('Tulcea', 'give'), |
|
941 | + 'VL' => __('Valcea', 'give'), |
|
942 | + 'VS' => __('Vaslui', 'give'), |
|
943 | + 'VN' => __('Vrancea', 'give'), |
|
944 | 944 | ); |
945 | 945 | |
946 | - return apply_filters( 'give_romania_states', $states ); |
|
946 | + return apply_filters('give_romania_states', $states); |
|
947 | 947 | } |
948 | 948 | |
949 | 949 | /** |
@@ -955,17 +955,17 @@ discard block |
||
955 | 955 | function give_get_pakistan_states_list() { |
956 | 956 | $states = array( |
957 | 957 | '' => '', |
958 | - 'JK' => __( 'Azad Kashmir', 'give' ), |
|
959 | - 'BA' => __( 'Balochistan', 'give' ), |
|
960 | - 'TA' => __( 'FATA', 'give' ), |
|
961 | - 'GB' => __( 'Gilgit Baltistan', 'give' ), |
|
962 | - 'IS' => __( 'Islamabad Capital Territory', 'give' ), |
|
963 | - 'KP' => __( 'Khyber Pakhtunkhwa', 'give' ), |
|
964 | - 'PB' => __( 'Punjab', 'give' ), |
|
965 | - 'SD' => __( 'Sindh', 'give' ), |
|
958 | + 'JK' => __('Azad Kashmir', 'give'), |
|
959 | + 'BA' => __('Balochistan', 'give'), |
|
960 | + 'TA' => __('FATA', 'give'), |
|
961 | + 'GB' => __('Gilgit Baltistan', 'give'), |
|
962 | + 'IS' => __('Islamabad Capital Territory', 'give'), |
|
963 | + 'KP' => __('Khyber Pakhtunkhwa', 'give'), |
|
964 | + 'PB' => __('Punjab', 'give'), |
|
965 | + 'SD' => __('Sindh', 'give'), |
|
966 | 966 | ); |
967 | 967 | |
968 | - return apply_filters( 'give_pakistan_states', $states ); |
|
968 | + return apply_filters('give_pakistan_states', $states); |
|
969 | 969 | } |
970 | 970 | |
971 | 971 | /** |
@@ -977,91 +977,91 @@ discard block |
||
977 | 977 | function give_get_philippines_states_list() { |
978 | 978 | $states = array( |
979 | 979 | '' => '', |
980 | - 'ABR' => __( 'Abra', 'give' ), |
|
981 | - 'AGN' => __( 'Agusan del Norte', 'give' ), |
|
982 | - 'AGS' => __( 'Agusan del Sur', 'give' ), |
|
983 | - 'AKL' => __( 'Aklan', 'give' ), |
|
984 | - 'ALB' => __( 'Albay', 'give' ), |
|
985 | - 'ANT' => __( 'Antique', 'give' ), |
|
986 | - 'APA' => __( 'Apayao', 'give' ), |
|
987 | - 'AUR' => __( 'Aurora', 'give' ), |
|
988 | - 'BAS' => __( 'Basilan', 'give' ), |
|
989 | - 'BAN' => __( 'Bataan', 'give' ), |
|
990 | - 'BTN' => __( 'Batanes', 'give' ), |
|
991 | - 'BTG' => __( 'Batangas', 'give' ), |
|
992 | - 'BEN' => __( 'Benguet', 'give' ), |
|
993 | - 'BIL' => __( 'Biliran', 'give' ), |
|
994 | - 'BOH' => __( 'Bohol', 'give' ), |
|
995 | - 'BUK' => __( 'Bukidnon', 'give' ), |
|
996 | - 'BUL' => __( 'Bulacan', 'give' ), |
|
997 | - 'CAG' => __( 'Cagayan', 'give' ), |
|
998 | - 'CAN' => __( 'Camarines Norte', 'give' ), |
|
999 | - 'CAS' => __( 'Camarines Sur', 'give' ), |
|
1000 | - 'CAM' => __( 'Camiguin', 'give' ), |
|
1001 | - 'CAP' => __( 'Capiz', 'give' ), |
|
1002 | - 'CAT' => __( 'Catanduanes', 'give' ), |
|
1003 | - 'CAV' => __( 'Cavite', 'give' ), |
|
1004 | - 'CEB' => __( 'Cebu', 'give' ), |
|
1005 | - 'COM' => __( 'Compostela Valley', 'give' ), |
|
1006 | - 'NCO' => __( 'Cotabato', 'give' ), |
|
1007 | - 'DAV' => __( 'Davao del Norte', 'give' ), |
|
1008 | - 'DAS' => __( 'Davao del Sur', 'give' ), |
|
1009 | - 'DAC' => __( 'Davao Occidental', 'give' ), // TODO: Needs to be updated when ISO code is assigned |
|
1010 | - 'DAO' => __( 'Davao Oriental', 'give' ), |
|
1011 | - 'DIN' => __( 'Dinagat Islands', 'give' ), |
|
1012 | - 'EAS' => __( 'Eastern Samar', 'give' ), |
|
1013 | - 'GUI' => __( 'Guimaras', 'give' ), |
|
1014 | - 'IFU' => __( 'Ifugao', 'give' ), |
|
1015 | - 'ILN' => __( 'Ilocos Norte', 'give' ), |
|
1016 | - 'ILS' => __( 'Ilocos Sur', 'give' ), |
|
1017 | - 'ILI' => __( 'Iloilo', 'give' ), |
|
1018 | - 'ISA' => __( 'Isabela', 'give' ), |
|
1019 | - 'KAL' => __( 'Kalinga', 'give' ), |
|
1020 | - 'LUN' => __( 'La Union', 'give' ), |
|
1021 | - 'LAG' => __( 'Laguna', 'give' ), |
|
1022 | - 'LAN' => __( 'Lanao del Norte', 'give' ), |
|
1023 | - 'LAS' => __( 'Lanao del Sur', 'give' ), |
|
1024 | - 'LEY' => __( 'Leyte', 'give' ), |
|
1025 | - 'MAG' => __( 'Maguindanao', 'give' ), |
|
1026 | - 'MAD' => __( 'Marinduque', 'give' ), |
|
1027 | - 'MAS' => __( 'Masbate', 'give' ), |
|
1028 | - 'MSC' => __( 'Misamis Occidental', 'give' ), |
|
1029 | - 'MSR' => __( 'Misamis Oriental', 'give' ), |
|
1030 | - 'MOU' => __( 'Mountain Province', 'give' ), |
|
1031 | - 'NEC' => __( 'Negros Occidental', 'give' ), |
|
1032 | - 'NER' => __( 'Negros Oriental', 'give' ), |
|
1033 | - 'NSA' => __( 'Northern Samar', 'give' ), |
|
1034 | - 'NUE' => __( 'Nueva Ecija', 'give' ), |
|
1035 | - 'NUV' => __( 'Nueva Vizcaya', 'give' ), |
|
1036 | - 'MDC' => __( 'Occidental Mindoro', 'give' ), |
|
1037 | - 'MDR' => __( 'Oriental Mindoro', 'give' ), |
|
1038 | - 'PLW' => __( 'Palawan', 'give' ), |
|
1039 | - 'PAM' => __( 'Pampanga', 'give' ), |
|
1040 | - 'PAN' => __( 'Pangasinan', 'give' ), |
|
1041 | - 'QUE' => __( 'Quezon', 'give' ), |
|
1042 | - 'QUI' => __( 'Quirino', 'give' ), |
|
1043 | - 'RIZ' => __( 'Rizal', 'give' ), |
|
1044 | - 'ROM' => __( 'Romblon', 'give' ), |
|
1045 | - 'WSA' => __( 'Samar', 'give' ), |
|
1046 | - 'SAR' => __( 'Sarangani', 'give' ), |
|
1047 | - 'SIQ' => __( 'Siquijor', 'give' ), |
|
1048 | - 'SOR' => __( 'Sorsogon', 'give' ), |
|
1049 | - 'SCO' => __( 'South Cotabato', 'give' ), |
|
1050 | - 'SLE' => __( 'Southern Leyte', 'give' ), |
|
1051 | - 'SUK' => __( 'Sultan Kudarat', 'give' ), |
|
1052 | - 'SLU' => __( 'Sulu', 'give' ), |
|
1053 | - 'SUN' => __( 'Surigao del Norte', 'give' ), |
|
1054 | - 'SUR' => __( 'Surigao del Sur', 'give' ), |
|
1055 | - 'TAR' => __( 'Tarlac', 'give' ), |
|
1056 | - 'TAW' => __( 'Tawi-Tawi', 'give' ), |
|
1057 | - 'ZMB' => __( 'Zambales', 'give' ), |
|
1058 | - 'ZAN' => __( 'Zamboanga del Norte', 'give' ), |
|
1059 | - 'ZAS' => __( 'Zamboanga del Sur', 'give' ), |
|
1060 | - 'ZSI' => __( 'Zamboanga Sibugay', 'give' ), |
|
1061 | - '00' => __( 'Metro Manila', 'give' ), |
|
980 | + 'ABR' => __('Abra', 'give'), |
|
981 | + 'AGN' => __('Agusan del Norte', 'give'), |
|
982 | + 'AGS' => __('Agusan del Sur', 'give'), |
|
983 | + 'AKL' => __('Aklan', 'give'), |
|
984 | + 'ALB' => __('Albay', 'give'), |
|
985 | + 'ANT' => __('Antique', 'give'), |
|
986 | + 'APA' => __('Apayao', 'give'), |
|
987 | + 'AUR' => __('Aurora', 'give'), |
|
988 | + 'BAS' => __('Basilan', 'give'), |
|
989 | + 'BAN' => __('Bataan', 'give'), |
|
990 | + 'BTN' => __('Batanes', 'give'), |
|
991 | + 'BTG' => __('Batangas', 'give'), |
|
992 | + 'BEN' => __('Benguet', 'give'), |
|
993 | + 'BIL' => __('Biliran', 'give'), |
|
994 | + 'BOH' => __('Bohol', 'give'), |
|
995 | + 'BUK' => __('Bukidnon', 'give'), |
|
996 | + 'BUL' => __('Bulacan', 'give'), |
|
997 | + 'CAG' => __('Cagayan', 'give'), |
|
998 | + 'CAN' => __('Camarines Norte', 'give'), |
|
999 | + 'CAS' => __('Camarines Sur', 'give'), |
|
1000 | + 'CAM' => __('Camiguin', 'give'), |
|
1001 | + 'CAP' => __('Capiz', 'give'), |
|
1002 | + 'CAT' => __('Catanduanes', 'give'), |
|
1003 | + 'CAV' => __('Cavite', 'give'), |
|
1004 | + 'CEB' => __('Cebu', 'give'), |
|
1005 | + 'COM' => __('Compostela Valley', 'give'), |
|
1006 | + 'NCO' => __('Cotabato', 'give'), |
|
1007 | + 'DAV' => __('Davao del Norte', 'give'), |
|
1008 | + 'DAS' => __('Davao del Sur', 'give'), |
|
1009 | + 'DAC' => __('Davao Occidental', 'give'), // TODO: Needs to be updated when ISO code is assigned |
|
1010 | + 'DAO' => __('Davao Oriental', 'give'), |
|
1011 | + 'DIN' => __('Dinagat Islands', 'give'), |
|
1012 | + 'EAS' => __('Eastern Samar', 'give'), |
|
1013 | + 'GUI' => __('Guimaras', 'give'), |
|
1014 | + 'IFU' => __('Ifugao', 'give'), |
|
1015 | + 'ILN' => __('Ilocos Norte', 'give'), |
|
1016 | + 'ILS' => __('Ilocos Sur', 'give'), |
|
1017 | + 'ILI' => __('Iloilo', 'give'), |
|
1018 | + 'ISA' => __('Isabela', 'give'), |
|
1019 | + 'KAL' => __('Kalinga', 'give'), |
|
1020 | + 'LUN' => __('La Union', 'give'), |
|
1021 | + 'LAG' => __('Laguna', 'give'), |
|
1022 | + 'LAN' => __('Lanao del Norte', 'give'), |
|
1023 | + 'LAS' => __('Lanao del Sur', 'give'), |
|
1024 | + 'LEY' => __('Leyte', 'give'), |
|
1025 | + 'MAG' => __('Maguindanao', 'give'), |
|
1026 | + 'MAD' => __('Marinduque', 'give'), |
|
1027 | + 'MAS' => __('Masbate', 'give'), |
|
1028 | + 'MSC' => __('Misamis Occidental', 'give'), |
|
1029 | + 'MSR' => __('Misamis Oriental', 'give'), |
|
1030 | + 'MOU' => __('Mountain Province', 'give'), |
|
1031 | + 'NEC' => __('Negros Occidental', 'give'), |
|
1032 | + 'NER' => __('Negros Oriental', 'give'), |
|
1033 | + 'NSA' => __('Northern Samar', 'give'), |
|
1034 | + 'NUE' => __('Nueva Ecija', 'give'), |
|
1035 | + 'NUV' => __('Nueva Vizcaya', 'give'), |
|
1036 | + 'MDC' => __('Occidental Mindoro', 'give'), |
|
1037 | + 'MDR' => __('Oriental Mindoro', 'give'), |
|
1038 | + 'PLW' => __('Palawan', 'give'), |
|
1039 | + 'PAM' => __('Pampanga', 'give'), |
|
1040 | + 'PAN' => __('Pangasinan', 'give'), |
|
1041 | + 'QUE' => __('Quezon', 'give'), |
|
1042 | + 'QUI' => __('Quirino', 'give'), |
|
1043 | + 'RIZ' => __('Rizal', 'give'), |
|
1044 | + 'ROM' => __('Romblon', 'give'), |
|
1045 | + 'WSA' => __('Samar', 'give'), |
|
1046 | + 'SAR' => __('Sarangani', 'give'), |
|
1047 | + 'SIQ' => __('Siquijor', 'give'), |
|
1048 | + 'SOR' => __('Sorsogon', 'give'), |
|
1049 | + 'SCO' => __('South Cotabato', 'give'), |
|
1050 | + 'SLE' => __('Southern Leyte', 'give'), |
|
1051 | + 'SUK' => __('Sultan Kudarat', 'give'), |
|
1052 | + 'SLU' => __('Sulu', 'give'), |
|
1053 | + 'SUN' => __('Surigao del Norte', 'give'), |
|
1054 | + 'SUR' => __('Surigao del Sur', 'give'), |
|
1055 | + 'TAR' => __('Tarlac', 'give'), |
|
1056 | + 'TAW' => __('Tawi-Tawi', 'give'), |
|
1057 | + 'ZMB' => __('Zambales', 'give'), |
|
1058 | + 'ZAN' => __('Zamboanga del Norte', 'give'), |
|
1059 | + 'ZAS' => __('Zamboanga del Sur', 'give'), |
|
1060 | + 'ZSI' => __('Zamboanga Sibugay', 'give'), |
|
1061 | + '00' => __('Metro Manila', 'give'), |
|
1062 | 1062 | ); |
1063 | 1063 | |
1064 | - return apply_filters( 'give_philippines_states', $states ); |
|
1064 | + return apply_filters('give_philippines_states', $states); |
|
1065 | 1065 | } |
1066 | 1066 | |
1067 | 1067 | /** |
@@ -1073,35 +1073,35 @@ discard block |
||
1073 | 1073 | function give_get_peru_states_list() { |
1074 | 1074 | $states = array( |
1075 | 1075 | '' => '', |
1076 | - 'CAL' => __( 'El Callao', 'give' ), |
|
1077 | - 'LMA' => __( 'Municipalidad Metropolitana de Lima', 'give' ), |
|
1078 | - 'AMA' => __( 'Amazonas', 'give' ), |
|
1079 | - 'ANC' => __( 'Ancash', 'give' ), |
|
1080 | - 'APU' => __( 'Apurímac', 'give' ), |
|
1081 | - 'ARE' => __( 'Arequipa', 'give' ), |
|
1082 | - 'AYA' => __( 'Ayacucho', 'give' ), |
|
1083 | - 'CAJ' => __( 'Cajamarca', 'give' ), |
|
1084 | - 'CUS' => __( 'Cusco', 'give' ), |
|
1085 | - 'HUV' => __( 'Huancavelica', 'give' ), |
|
1086 | - 'HUC' => __( 'Huánuco', 'give' ), |
|
1087 | - 'ICA' => __( 'Ica', 'give' ), |
|
1088 | - 'JUN' => __( 'Junín', 'give' ), |
|
1089 | - 'LAL' => __( 'La Libertad', 'give' ), |
|
1090 | - 'LAM' => __( 'Lambayeque', 'give' ), |
|
1091 | - 'LIM' => __( 'Lima', 'give' ), |
|
1092 | - 'LOR' => __( 'Loreto', 'give' ), |
|
1093 | - 'MDD' => __( 'Madre de Dios', 'give' ), |
|
1094 | - 'MOQ' => __( 'Moquegua', 'give' ), |
|
1095 | - 'PAS' => __( 'Pasco', 'give' ), |
|
1096 | - 'PIU' => __( 'Piura', 'give' ), |
|
1097 | - 'PUN' => __( 'Puno', 'give' ), |
|
1098 | - 'SAM' => __( 'San Martín', 'give' ), |
|
1099 | - 'TAC' => __( 'Tacna', 'give' ), |
|
1100 | - 'TUM' => __( 'Tumbes', 'give' ), |
|
1101 | - 'UCA' => __( 'Ucayali', 'give' ), |
|
1076 | + 'CAL' => __('El Callao', 'give'), |
|
1077 | + 'LMA' => __('Municipalidad Metropolitana de Lima', 'give'), |
|
1078 | + 'AMA' => __('Amazonas', 'give'), |
|
1079 | + 'ANC' => __('Ancash', 'give'), |
|
1080 | + 'APU' => __('Apurímac', 'give'), |
|
1081 | + 'ARE' => __('Arequipa', 'give'), |
|
1082 | + 'AYA' => __('Ayacucho', 'give'), |
|
1083 | + 'CAJ' => __('Cajamarca', 'give'), |
|
1084 | + 'CUS' => __('Cusco', 'give'), |
|
1085 | + 'HUV' => __('Huancavelica', 'give'), |
|
1086 | + 'HUC' => __('Huánuco', 'give'), |
|
1087 | + 'ICA' => __('Ica', 'give'), |
|
1088 | + 'JUN' => __('Junín', 'give'), |
|
1089 | + 'LAL' => __('La Libertad', 'give'), |
|
1090 | + 'LAM' => __('Lambayeque', 'give'), |
|
1091 | + 'LIM' => __('Lima', 'give'), |
|
1092 | + 'LOR' => __('Loreto', 'give'), |
|
1093 | + 'MDD' => __('Madre de Dios', 'give'), |
|
1094 | + 'MOQ' => __('Moquegua', 'give'), |
|
1095 | + 'PAS' => __('Pasco', 'give'), |
|
1096 | + 'PIU' => __('Piura', 'give'), |
|
1097 | + 'PUN' => __('Puno', 'give'), |
|
1098 | + 'SAM' => __('San Martín', 'give'), |
|
1099 | + 'TAC' => __('Tacna', 'give'), |
|
1100 | + 'TUM' => __('Tumbes', 'give'), |
|
1101 | + 'UCA' => __('Ucayali', 'give'), |
|
1102 | 1102 | ); |
1103 | 1103 | |
1104 | - return apply_filters( 'give_peru_states', $states ); |
|
1104 | + return apply_filters('give_peru_states', $states); |
|
1105 | 1105 | } |
1106 | 1106 | |
1107 | 1107 | /** |
@@ -1113,23 +1113,23 @@ discard block |
||
1113 | 1113 | function give_get_nepal_states_list() { |
1114 | 1114 | $states = array( |
1115 | 1115 | '' => '', |
1116 | - 'BAG' => __( 'Bagmati', 'give' ), |
|
1117 | - 'BHE' => __( 'Bheri', 'give' ), |
|
1118 | - 'DHA' => __( 'Dhaulagiri', 'give' ), |
|
1119 | - 'GAN' => __( 'Gandaki', 'give' ), |
|
1120 | - 'JAN' => __( 'Janakpur', 'give' ), |
|
1121 | - 'KAR' => __( 'Karnali', 'give' ), |
|
1122 | - 'KOS' => __( 'Koshi', 'give' ), |
|
1123 | - 'LUM' => __( 'Lumbini', 'give' ), |
|
1124 | - 'MAH' => __( 'Mahakali', 'give' ), |
|
1125 | - 'MEC' => __( 'Mechi', 'give' ), |
|
1126 | - 'NAR' => __( 'Narayani', 'give' ), |
|
1127 | - 'RAP' => __( 'Rapti', 'give' ), |
|
1128 | - 'SAG' => __( 'Sagarmatha', 'give' ), |
|
1129 | - 'SET' => __( 'Seti', 'give' ), |
|
1116 | + 'BAG' => __('Bagmati', 'give'), |
|
1117 | + 'BHE' => __('Bheri', 'give'), |
|
1118 | + 'DHA' => __('Dhaulagiri', 'give'), |
|
1119 | + 'GAN' => __('Gandaki', 'give'), |
|
1120 | + 'JAN' => __('Janakpur', 'give'), |
|
1121 | + 'KAR' => __('Karnali', 'give'), |
|
1122 | + 'KOS' => __('Koshi', 'give'), |
|
1123 | + 'LUM' => __('Lumbini', 'give'), |
|
1124 | + 'MAH' => __('Mahakali', 'give'), |
|
1125 | + 'MEC' => __('Mechi', 'give'), |
|
1126 | + 'NAR' => __('Narayani', 'give'), |
|
1127 | + 'RAP' => __('Rapti', 'give'), |
|
1128 | + 'SAG' => __('Sagarmatha', 'give'), |
|
1129 | + 'SET' => __('Seti', 'give'), |
|
1130 | 1130 | ); |
1131 | 1131 | |
1132 | - return apply_filters( 'give_nepal_states', $states ); |
|
1132 | + return apply_filters('give_nepal_states', $states); |
|
1133 | 1133 | } |
1134 | 1134 | |
1135 | 1135 | /** |
@@ -1141,46 +1141,46 @@ discard block |
||
1141 | 1141 | function give_get_nigerian_states_list() { |
1142 | 1142 | $states = array( |
1143 | 1143 | '' => '', |
1144 | - 'AB' => __( 'Abia', 'give' ), |
|
1145 | - 'FC' => __( 'Abuja', 'give' ), |
|
1146 | - 'AD' => __( 'Adamawa', 'give' ), |
|
1147 | - 'AK' => __( 'Akwa Ibom', 'give' ), |
|
1148 | - 'AN' => __( 'Anambra', 'give' ), |
|
1149 | - 'BA' => __( 'Bauchi', 'give' ), |
|
1150 | - 'BY' => __( 'Bayelsa', 'give' ), |
|
1151 | - 'BE' => __( 'Benue', 'give' ), |
|
1152 | - 'BO' => __( 'Borno', 'give' ), |
|
1153 | - 'CR' => __( 'Cross River', 'give' ), |
|
1154 | - 'DE' => __( 'Delta', 'give' ), |
|
1155 | - 'EB' => __( 'Ebonyi', 'give' ), |
|
1156 | - 'ED' => __( 'Edo', 'give' ), |
|
1157 | - 'EK' => __( 'Ekiti', 'give' ), |
|
1158 | - 'EN' => __( 'Enugu', 'give' ), |
|
1159 | - 'GO' => __( 'Gombe', 'give' ), |
|
1160 | - 'IM' => __( 'Imo', 'give' ), |
|
1161 | - 'JI' => __( 'Jigawa', 'give' ), |
|
1162 | - 'KD' => __( 'Kaduna', 'give' ), |
|
1163 | - 'KN' => __( 'Kano', 'give' ), |
|
1164 | - 'KT' => __( 'Katsina', 'give' ), |
|
1165 | - 'KE' => __( 'Kebbi', 'give' ), |
|
1166 | - 'KO' => __( 'Kogi', 'give' ), |
|
1167 | - 'KW' => __( 'Kwara', 'give' ), |
|
1168 | - 'LA' => __( 'Lagos', 'give' ), |
|
1169 | - 'NA' => __( 'Nasarawa', 'give' ), |
|
1170 | - 'NI' => __( 'Niger', 'give' ), |
|
1171 | - 'OG' => __( 'Ogun', 'give' ), |
|
1172 | - 'ON' => __( 'Ondo', 'give' ), |
|
1173 | - 'OS' => __( 'Osun', 'give' ), |
|
1174 | - 'OY' => __( 'Oyo', 'give' ), |
|
1175 | - 'PL' => __( 'Plateau', 'give' ), |
|
1176 | - 'RI' => __( 'Rivers', 'give' ), |
|
1177 | - 'SO' => __( 'Sokoto', 'give' ), |
|
1178 | - 'TA' => __( 'Taraba', 'give' ), |
|
1179 | - 'YO' => __( 'Yobe', 'give' ), |
|
1180 | - 'ZA' => __( 'Zamfara', 'give' ), |
|
1144 | + 'AB' => __('Abia', 'give'), |
|
1145 | + 'FC' => __('Abuja', 'give'), |
|
1146 | + 'AD' => __('Adamawa', 'give'), |
|
1147 | + 'AK' => __('Akwa Ibom', 'give'), |
|
1148 | + 'AN' => __('Anambra', 'give'), |
|
1149 | + 'BA' => __('Bauchi', 'give'), |
|
1150 | + 'BY' => __('Bayelsa', 'give'), |
|
1151 | + 'BE' => __('Benue', 'give'), |
|
1152 | + 'BO' => __('Borno', 'give'), |
|
1153 | + 'CR' => __('Cross River', 'give'), |
|
1154 | + 'DE' => __('Delta', 'give'), |
|
1155 | + 'EB' => __('Ebonyi', 'give'), |
|
1156 | + 'ED' => __('Edo', 'give'), |
|
1157 | + 'EK' => __('Ekiti', 'give'), |
|
1158 | + 'EN' => __('Enugu', 'give'), |
|
1159 | + 'GO' => __('Gombe', 'give'), |
|
1160 | + 'IM' => __('Imo', 'give'), |
|
1161 | + 'JI' => __('Jigawa', 'give'), |
|
1162 | + 'KD' => __('Kaduna', 'give'), |
|
1163 | + 'KN' => __('Kano', 'give'), |
|
1164 | + 'KT' => __('Katsina', 'give'), |
|
1165 | + 'KE' => __('Kebbi', 'give'), |
|
1166 | + 'KO' => __('Kogi', 'give'), |
|
1167 | + 'KW' => __('Kwara', 'give'), |
|
1168 | + 'LA' => __('Lagos', 'give'), |
|
1169 | + 'NA' => __('Nasarawa', 'give'), |
|
1170 | + 'NI' => __('Niger', 'give'), |
|
1171 | + 'OG' => __('Ogun', 'give'), |
|
1172 | + 'ON' => __('Ondo', 'give'), |
|
1173 | + 'OS' => __('Osun', 'give'), |
|
1174 | + 'OY' => __('Oyo', 'give'), |
|
1175 | + 'PL' => __('Plateau', 'give'), |
|
1176 | + 'RI' => __('Rivers', 'give'), |
|
1177 | + 'SO' => __('Sokoto', 'give'), |
|
1178 | + 'TA' => __('Taraba', 'give'), |
|
1179 | + 'YO' => __('Yobe', 'give'), |
|
1180 | + 'ZA' => __('Zamfara', 'give'), |
|
1181 | 1181 | ); |
1182 | 1182 | |
1183 | - return apply_filters( 'give_nigerian_states', $states ); |
|
1183 | + return apply_filters('give_nigerian_states', $states); |
|
1184 | 1184 | } |
1185 | 1185 | |
1186 | 1186 | /** |
@@ -1192,41 +1192,41 @@ discard block |
||
1192 | 1192 | function give_get_mexico_states_list() { |
1193 | 1193 | $states = array( |
1194 | 1194 | '' => '', |
1195 | - 'Distrito Federal' => __( 'Distrito Federal', 'give' ), |
|
1196 | - 'Jalisco' => __( 'Jalisco', 'give' ), |
|
1197 | - 'Nuevo Leon' => __( 'Nuevo León', 'give' ), |
|
1198 | - 'Aguascalientes' => __( 'Aguascalientes', 'give' ), |
|
1199 | - 'Baja California' => __( 'Baja California', 'give' ), |
|
1200 | - 'Baja California Sur' => __( 'Baja California Sur', 'give' ), |
|
1201 | - 'Campeche' => __( 'Campeche', 'give' ), |
|
1202 | - 'Chiapas' => __( 'Chiapas', 'give' ), |
|
1203 | - 'Chihuahua' => __( 'Chihuahua', 'give' ), |
|
1204 | - 'Coahuila' => __( 'Coahuila', 'give' ), |
|
1205 | - 'Colima' => __( 'Colima', 'give' ), |
|
1206 | - 'Durango' => __( 'Durango', 'give' ), |
|
1207 | - 'Guanajuato' => __( 'Guanajuato', 'give' ), |
|
1208 | - 'Guerrero' => __( 'Guerrero', 'give' ), |
|
1209 | - 'Hidalgo' => __( 'Hidalgo', 'give' ), |
|
1210 | - 'Estado de Mexico' => __( 'Edo. de México', 'give' ), |
|
1211 | - 'Michoacan' => __( 'Michoacán', 'give' ), |
|
1212 | - 'Morelos' => __( 'Morelos', 'give' ), |
|
1213 | - 'Nayarit' => __( 'Nayarit', 'give' ), |
|
1214 | - 'Oaxaca' => __( 'Oaxaca', 'give' ), |
|
1215 | - 'Puebla' => __( 'Puebla', 'give' ), |
|
1216 | - 'Queretaro' => __( 'Querétaro', 'give' ), |
|
1217 | - 'Quintana Roo' => __( 'Quintana Roo', 'give' ), |
|
1218 | - 'San Luis Potosi' => __( 'San Luis Potosí', 'give' ), |
|
1219 | - 'Sinaloa' => __( 'Sinaloa', 'give' ), |
|
1220 | - 'Sonora' => __( 'Sonora', 'give' ), |
|
1221 | - 'Tabasco' => __( 'Tabasco', 'give' ), |
|
1222 | - 'Tamaulipas' => __( 'Tamaulipas', 'give' ), |
|
1223 | - 'Tlaxcala' => __( 'Tlaxcala', 'give' ), |
|
1224 | - 'Veracruz' => __( 'Veracruz', 'give' ), |
|
1225 | - 'Yucatan' => __( 'Yucatán', 'give' ), |
|
1226 | - 'Zacatecas' => __( 'Zacatecas', 'give' ), |
|
1195 | + 'Distrito Federal' => __('Distrito Federal', 'give'), |
|
1196 | + 'Jalisco' => __('Jalisco', 'give'), |
|
1197 | + 'Nuevo Leon' => __('Nuevo León', 'give'), |
|
1198 | + 'Aguascalientes' => __('Aguascalientes', 'give'), |
|
1199 | + 'Baja California' => __('Baja California', 'give'), |
|
1200 | + 'Baja California Sur' => __('Baja California Sur', 'give'), |
|
1201 | + 'Campeche' => __('Campeche', 'give'), |
|
1202 | + 'Chiapas' => __('Chiapas', 'give'), |
|
1203 | + 'Chihuahua' => __('Chihuahua', 'give'), |
|
1204 | + 'Coahuila' => __('Coahuila', 'give'), |
|
1205 | + 'Colima' => __('Colima', 'give'), |
|
1206 | + 'Durango' => __('Durango', 'give'), |
|
1207 | + 'Guanajuato' => __('Guanajuato', 'give'), |
|
1208 | + 'Guerrero' => __('Guerrero', 'give'), |
|
1209 | + 'Hidalgo' => __('Hidalgo', 'give'), |
|
1210 | + 'Estado de Mexico' => __('Edo. de México', 'give'), |
|
1211 | + 'Michoacan' => __('Michoacán', 'give'), |
|
1212 | + 'Morelos' => __('Morelos', 'give'), |
|
1213 | + 'Nayarit' => __('Nayarit', 'give'), |
|
1214 | + 'Oaxaca' => __('Oaxaca', 'give'), |
|
1215 | + 'Puebla' => __('Puebla', 'give'), |
|
1216 | + 'Queretaro' => __('Querétaro', 'give'), |
|
1217 | + 'Quintana Roo' => __('Quintana Roo', 'give'), |
|
1218 | + 'San Luis Potosi' => __('San Luis Potosí', 'give'), |
|
1219 | + 'Sinaloa' => __('Sinaloa', 'give'), |
|
1220 | + 'Sonora' => __('Sonora', 'give'), |
|
1221 | + 'Tabasco' => __('Tabasco', 'give'), |
|
1222 | + 'Tamaulipas' => __('Tamaulipas', 'give'), |
|
1223 | + 'Tlaxcala' => __('Tlaxcala', 'give'), |
|
1224 | + 'Veracruz' => __('Veracruz', 'give'), |
|
1225 | + 'Yucatan' => __('Yucatán', 'give'), |
|
1226 | + 'Zacatecas' => __('Zacatecas', 'give'), |
|
1227 | 1227 | ); |
1228 | 1228 | |
1229 | - return apply_filters( 'give_mexico_states', $states ); |
|
1229 | + return apply_filters('give_mexico_states', $states); |
|
1230 | 1230 | } |
1231 | 1231 | |
1232 | 1232 | /** |
@@ -1238,56 +1238,56 @@ discard block |
||
1238 | 1238 | function give_get_japan_states_list() { |
1239 | 1239 | $states = array( |
1240 | 1240 | '' => '', |
1241 | - 'JP01' => __( 'Hokkaido', 'give' ), |
|
1242 | - 'JP02' => __( 'Aomori', 'give' ), |
|
1243 | - 'JP03' => __( 'Iwate', 'give' ), |
|
1244 | - 'JP04' => __( 'Miyagi', 'give' ), |
|
1245 | - 'JP05' => __( 'Akita', 'give' ), |
|
1246 | - 'JP06' => __( 'Yamagata', 'give' ), |
|
1247 | - 'JP07' => __( 'Fukushima', 'give' ), |
|
1248 | - 'JP08' => __( 'Ibaraki', 'give' ), |
|
1249 | - 'JP09' => __( 'Tochigi', 'give' ), |
|
1250 | - 'JP10' => __( 'Gunma', 'give' ), |
|
1251 | - 'JP11' => __( 'Saitama', 'give' ), |
|
1252 | - 'JP12' => __( 'Chiba', 'give' ), |
|
1253 | - 'JP13' => __( 'Tokyo', 'give' ), |
|
1254 | - 'JP14' => __( 'Kanagawa', 'give' ), |
|
1255 | - 'JP15' => __( 'Niigata', 'give' ), |
|
1256 | - 'JP16' => __( 'Toyama', 'give' ), |
|
1257 | - 'JP17' => __( 'Ishikawa', 'give' ), |
|
1258 | - 'JP18' => __( 'Fukui', 'give' ), |
|
1259 | - 'JP19' => __( 'Yamanashi', 'give' ), |
|
1260 | - 'JP20' => __( 'Nagano', 'give' ), |
|
1261 | - 'JP21' => __( 'Gifu', 'give' ), |
|
1262 | - 'JP22' => __( 'Shizuoka', 'give' ), |
|
1263 | - 'JP23' => __( 'Aichi', 'give' ), |
|
1264 | - 'JP24' => __( 'Mie', 'give' ), |
|
1265 | - 'JP25' => __( 'Shiga', 'give' ), |
|
1266 | - 'JP26' => __( 'Kyoto', 'give' ), |
|
1267 | - 'JP27' => __( 'Osaka', 'give' ), |
|
1268 | - 'JP28' => __( 'Hyogo', 'give' ), |
|
1269 | - 'JP29' => __( 'Nara', 'give' ), |
|
1270 | - 'JP30' => __( 'Wakayama', 'give' ), |
|
1271 | - 'JP31' => __( 'Tottori', 'give' ), |
|
1272 | - 'JP32' => __( 'Shimane', 'give' ), |
|
1273 | - 'JP33' => __( 'Okayama', 'give' ), |
|
1274 | - 'JP34' => __( 'Hiroshima', 'give' ), |
|
1275 | - 'JP35' => __( 'Yamaguchi', 'give' ), |
|
1276 | - 'JP36' => __( 'Tokushima', 'give' ), |
|
1277 | - 'JP37' => __( 'Kagawa', 'give' ), |
|
1278 | - 'JP38' => __( 'Ehime', 'give' ), |
|
1279 | - 'JP39' => __( 'Kochi', 'give' ), |
|
1280 | - 'JP40' => __( 'Fukuoka', 'give' ), |
|
1281 | - 'JP41' => __( 'Saga', 'give' ), |
|
1282 | - 'JP42' => __( 'Nagasaki', 'give' ), |
|
1283 | - 'JP43' => __( 'Kumamoto', 'give' ), |
|
1284 | - 'JP44' => __( 'Oita', 'give' ), |
|
1285 | - 'JP45' => __( 'Miyazaki', 'give' ), |
|
1286 | - 'JP46' => __( 'Kagoshima', 'give' ), |
|
1287 | - 'JP47' => __( 'Okinawa', 'give' ), |
|
1241 | + 'JP01' => __('Hokkaido', 'give'), |
|
1242 | + 'JP02' => __('Aomori', 'give'), |
|
1243 | + 'JP03' => __('Iwate', 'give'), |
|
1244 | + 'JP04' => __('Miyagi', 'give'), |
|
1245 | + 'JP05' => __('Akita', 'give'), |
|
1246 | + 'JP06' => __('Yamagata', 'give'), |
|
1247 | + 'JP07' => __('Fukushima', 'give'), |
|
1248 | + 'JP08' => __('Ibaraki', 'give'), |
|
1249 | + 'JP09' => __('Tochigi', 'give'), |
|
1250 | + 'JP10' => __('Gunma', 'give'), |
|
1251 | + 'JP11' => __('Saitama', 'give'), |
|
1252 | + 'JP12' => __('Chiba', 'give'), |
|
1253 | + 'JP13' => __('Tokyo', 'give'), |
|
1254 | + 'JP14' => __('Kanagawa', 'give'), |
|
1255 | + 'JP15' => __('Niigata', 'give'), |
|
1256 | + 'JP16' => __('Toyama', 'give'), |
|
1257 | + 'JP17' => __('Ishikawa', 'give'), |
|
1258 | + 'JP18' => __('Fukui', 'give'), |
|
1259 | + 'JP19' => __('Yamanashi', 'give'), |
|
1260 | + 'JP20' => __('Nagano', 'give'), |
|
1261 | + 'JP21' => __('Gifu', 'give'), |
|
1262 | + 'JP22' => __('Shizuoka', 'give'), |
|
1263 | + 'JP23' => __('Aichi', 'give'), |
|
1264 | + 'JP24' => __('Mie', 'give'), |
|
1265 | + 'JP25' => __('Shiga', 'give'), |
|
1266 | + 'JP26' => __('Kyoto', 'give'), |
|
1267 | + 'JP27' => __('Osaka', 'give'), |
|
1268 | + 'JP28' => __('Hyogo', 'give'), |
|
1269 | + 'JP29' => __('Nara', 'give'), |
|
1270 | + 'JP30' => __('Wakayama', 'give'), |
|
1271 | + 'JP31' => __('Tottori', 'give'), |
|
1272 | + 'JP32' => __('Shimane', 'give'), |
|
1273 | + 'JP33' => __('Okayama', 'give'), |
|
1274 | + 'JP34' => __('Hiroshima', 'give'), |
|
1275 | + 'JP35' => __('Yamaguchi', 'give'), |
|
1276 | + 'JP36' => __('Tokushima', 'give'), |
|
1277 | + 'JP37' => __('Kagawa', 'give'), |
|
1278 | + 'JP38' => __('Ehime', 'give'), |
|
1279 | + 'JP39' => __('Kochi', 'give'), |
|
1280 | + 'JP40' => __('Fukuoka', 'give'), |
|
1281 | + 'JP41' => __('Saga', 'give'), |
|
1282 | + 'JP42' => __('Nagasaki', 'give'), |
|
1283 | + 'JP43' => __('Kumamoto', 'give'), |
|
1284 | + 'JP44' => __('Oita', 'give'), |
|
1285 | + 'JP45' => __('Miyazaki', 'give'), |
|
1286 | + 'JP46' => __('Kagoshima', 'give'), |
|
1287 | + 'JP47' => __('Okinawa', 'give'), |
|
1288 | 1288 | ); |
1289 | 1289 | |
1290 | - return apply_filters( 'give_japan_states', $states ); |
|
1290 | + return apply_filters('give_japan_states', $states); |
|
1291 | 1291 | } |
1292 | 1292 | |
1293 | 1293 | /** |
@@ -1299,119 +1299,119 @@ discard block |
||
1299 | 1299 | function give_get_italy_states_list() { |
1300 | 1300 | $states = array( |
1301 | 1301 | '' => '', |
1302 | - 'AG' => __( 'Agrigento', 'give' ), |
|
1303 | - 'AL' => __( 'Alessandria', 'give' ), |
|
1304 | - 'AN' => __( 'Ancona', 'give' ), |
|
1305 | - 'AO' => __( 'Aosta', 'give' ), |
|
1306 | - 'AR' => __( 'Arezzo', 'give' ), |
|
1307 | - 'AP' => __( 'Ascoli Piceno', 'give' ), |
|
1308 | - 'AT' => __( 'Asti', 'give' ), |
|
1309 | - 'AV' => __( 'Avellino', 'give' ), |
|
1310 | - 'BA' => __( 'Bari', 'give' ), |
|
1311 | - 'BT' => __( 'Barletta-Andria-Trani', 'give' ), |
|
1312 | - 'BL' => __( 'Belluno', 'give' ), |
|
1313 | - 'BN' => __( 'Benevento', 'give' ), |
|
1314 | - 'BG' => __( 'Bergamo', 'give' ), |
|
1315 | - 'BI' => __( 'Biella', 'give' ), |
|
1316 | - 'BO' => __( 'Bologna', 'give' ), |
|
1317 | - 'BZ' => __( 'Bolzano', 'give' ), |
|
1318 | - 'BS' => __( 'Brescia', 'give' ), |
|
1319 | - 'BR' => __( 'Brindisi', 'give' ), |
|
1320 | - 'CA' => __( 'Cagliari', 'give' ), |
|
1321 | - 'CL' => __( 'Caltanissetta', 'give' ), |
|
1322 | - 'CB' => __( 'Campobasso', 'give' ), |
|
1323 | - 'CI' => __( 'Carbonia-Iglesias', 'give' ), |
|
1324 | - 'CE' => __( 'Caserta', 'give' ), |
|
1325 | - 'CT' => __( 'Catania', 'give' ), |
|
1326 | - 'CZ' => __( 'Catanzaro', 'give' ), |
|
1327 | - 'CH' => __( 'Chieti', 'give' ), |
|
1328 | - 'CO' => __( 'Como', 'give' ), |
|
1329 | - 'CS' => __( 'Cosenza', 'give' ), |
|
1330 | - 'CR' => __( 'Cremona', 'give' ), |
|
1331 | - 'KR' => __( 'Crotone', 'give' ), |
|
1332 | - 'CN' => __( 'Cuneo', 'give' ), |
|
1333 | - 'EN' => __( 'Enna', 'give' ), |
|
1334 | - 'FM' => __( 'Fermo', 'give' ), |
|
1335 | - 'FE' => __( 'Ferrara', 'give' ), |
|
1336 | - 'FI' => __( 'Firenze', 'give' ), |
|
1337 | - 'FG' => __( 'Foggia', 'give' ), |
|
1338 | - 'FC' => __( 'Forlì-Cesena', 'give' ), |
|
1339 | - 'FR' => __( 'Frosinone', 'give' ), |
|
1340 | - 'GE' => __( 'Genova', 'give' ), |
|
1341 | - 'GO' => __( 'Gorizia', 'give' ), |
|
1342 | - 'GR' => __( 'Grosseto', 'give' ), |
|
1343 | - 'IM' => __( 'Imperia', 'give' ), |
|
1344 | - 'IS' => __( 'Isernia', 'give' ), |
|
1345 | - 'SP' => __( 'La Spezia', 'give' ), |
|
1346 | - 'AQ' => __( "L'Aquila", 'give' ), |
|
1347 | - 'LT' => __( 'Latina', 'give' ), |
|
1348 | - 'LE' => __( 'Lecce', 'give' ), |
|
1349 | - 'LC' => __( 'Lecco', 'give' ), |
|
1350 | - 'LI' => __( 'Livorno', 'give' ), |
|
1351 | - 'LO' => __( 'Lodi', 'give' ), |
|
1352 | - 'LU' => __( 'Lucca', 'give' ), |
|
1353 | - 'MC' => __( 'Macerata', 'give' ), |
|
1354 | - 'MN' => __( 'Mantova', 'give' ), |
|
1355 | - 'MS' => __( 'Massa-Carrara', 'give' ), |
|
1356 | - 'MT' => __( 'Matera', 'give' ), |
|
1357 | - 'ME' => __( 'Messina', 'give' ), |
|
1358 | - 'MI' => __( 'Milano', 'give' ), |
|
1359 | - 'MO' => __( 'Modena', 'give' ), |
|
1360 | - 'MB' => __( 'Monza e della Brianza', 'give' ), |
|
1361 | - 'NA' => __( 'Napoli', 'give' ), |
|
1362 | - 'NO' => __( 'Novara', 'give' ), |
|
1363 | - 'NU' => __( 'Nuoro', 'give' ), |
|
1364 | - 'OT' => __( 'Olbia-Tempio', 'give' ), |
|
1365 | - 'OR' => __( 'Oristano', 'give' ), |
|
1366 | - 'PD' => __( 'Padova', 'give' ), |
|
1367 | - 'PA' => __( 'Palermo', 'give' ), |
|
1368 | - 'PR' => __( 'Parma', 'give' ), |
|
1369 | - 'PV' => __( 'Pavia', 'give' ), |
|
1370 | - 'PG' => __( 'Perugia', 'give' ), |
|
1371 | - 'PU' => __( 'Pesaro e Urbino', 'give' ), |
|
1372 | - 'PE' => __( 'Pescara', 'give' ), |
|
1373 | - 'PC' => __( 'Piacenza', 'give' ), |
|
1374 | - 'PI' => __( 'Pisa', 'give' ), |
|
1375 | - 'PT' => __( 'Pistoia', 'give' ), |
|
1376 | - 'PN' => __( 'Pordenone', 'give' ), |
|
1377 | - 'PZ' => __( 'Potenza', 'give' ), |
|
1378 | - 'PO' => __( 'Prato', 'give' ), |
|
1379 | - 'RG' => __( 'Ragusa', 'give' ), |
|
1380 | - 'RA' => __( 'Ravenna', 'give' ), |
|
1381 | - 'RC' => __( 'Reggio Calabria', 'give' ), |
|
1382 | - 'RE' => __( 'Reggio Emilia', 'give' ), |
|
1383 | - 'RI' => __( 'Rieti', 'give' ), |
|
1384 | - 'RN' => __( 'Rimini', 'give' ), |
|
1385 | - 'RM' => __( 'Roma', 'give' ), |
|
1386 | - 'RO' => __( 'Rovigo', 'give' ), |
|
1387 | - 'SA' => __( 'Salerno', 'give' ), |
|
1388 | - 'VS' => __( 'Medio Campidano', 'give' ), |
|
1389 | - 'SS' => __( 'Sassari', 'give' ), |
|
1390 | - 'SV' => __( 'Savona', 'give' ), |
|
1391 | - 'SI' => __( 'Siena', 'give' ), |
|
1392 | - 'SR' => __( 'Siracusa', 'give' ), |
|
1393 | - 'SO' => __( 'Sondrio', 'give' ), |
|
1394 | - 'TA' => __( 'Taranto', 'give' ), |
|
1395 | - 'TE' => __( 'Teramo', 'give' ), |
|
1396 | - 'TR' => __( 'Terni', 'give' ), |
|
1397 | - 'TO' => __( 'Torino', 'give' ), |
|
1398 | - 'OG' => __( 'Ogliastra', 'give' ), |
|
1399 | - 'TP' => __( 'Trapani', 'give' ), |
|
1400 | - 'TN' => __( 'Trento', 'give' ), |
|
1401 | - 'TV' => __( 'Treviso', 'give' ), |
|
1402 | - 'TS' => __( 'Trieste', 'give' ), |
|
1403 | - 'UD' => __( 'Udine', 'give' ), |
|
1404 | - 'VA' => __( 'Varese', 'give' ), |
|
1405 | - 'VE' => __( 'Venezia', 'give' ), |
|
1406 | - 'VB' => __( 'Verbano-Cusio-Ossola', 'give' ), |
|
1407 | - 'VC' => __( 'Vercelli', 'give' ), |
|
1408 | - 'VR' => __( 'Verona', 'give' ), |
|
1409 | - 'VV' => __( 'Vibo Valentia', 'give' ), |
|
1410 | - 'VI' => __( 'Vicenza', 'give' ), |
|
1411 | - 'VT' => __( 'Viterbo', 'give' ), |
|
1302 | + 'AG' => __('Agrigento', 'give'), |
|
1303 | + 'AL' => __('Alessandria', 'give'), |
|
1304 | + 'AN' => __('Ancona', 'give'), |
|
1305 | + 'AO' => __('Aosta', 'give'), |
|
1306 | + 'AR' => __('Arezzo', 'give'), |
|
1307 | + 'AP' => __('Ascoli Piceno', 'give'), |
|
1308 | + 'AT' => __('Asti', 'give'), |
|
1309 | + 'AV' => __('Avellino', 'give'), |
|
1310 | + 'BA' => __('Bari', 'give'), |
|
1311 | + 'BT' => __('Barletta-Andria-Trani', 'give'), |
|
1312 | + 'BL' => __('Belluno', 'give'), |
|
1313 | + 'BN' => __('Benevento', 'give'), |
|
1314 | + 'BG' => __('Bergamo', 'give'), |
|
1315 | + 'BI' => __('Biella', 'give'), |
|
1316 | + 'BO' => __('Bologna', 'give'), |
|
1317 | + 'BZ' => __('Bolzano', 'give'), |
|
1318 | + 'BS' => __('Brescia', 'give'), |
|
1319 | + 'BR' => __('Brindisi', 'give'), |
|
1320 | + 'CA' => __('Cagliari', 'give'), |
|
1321 | + 'CL' => __('Caltanissetta', 'give'), |
|
1322 | + 'CB' => __('Campobasso', 'give'), |
|
1323 | + 'CI' => __('Carbonia-Iglesias', 'give'), |
|
1324 | + 'CE' => __('Caserta', 'give'), |
|
1325 | + 'CT' => __('Catania', 'give'), |
|
1326 | + 'CZ' => __('Catanzaro', 'give'), |
|
1327 | + 'CH' => __('Chieti', 'give'), |
|
1328 | + 'CO' => __('Como', 'give'), |
|
1329 | + 'CS' => __('Cosenza', 'give'), |
|
1330 | + 'CR' => __('Cremona', 'give'), |
|
1331 | + 'KR' => __('Crotone', 'give'), |
|
1332 | + 'CN' => __('Cuneo', 'give'), |
|
1333 | + 'EN' => __('Enna', 'give'), |
|
1334 | + 'FM' => __('Fermo', 'give'), |
|
1335 | + 'FE' => __('Ferrara', 'give'), |
|
1336 | + 'FI' => __('Firenze', 'give'), |
|
1337 | + 'FG' => __('Foggia', 'give'), |
|
1338 | + 'FC' => __('Forlì-Cesena', 'give'), |
|
1339 | + 'FR' => __('Frosinone', 'give'), |
|
1340 | + 'GE' => __('Genova', 'give'), |
|
1341 | + 'GO' => __('Gorizia', 'give'), |
|
1342 | + 'GR' => __('Grosseto', 'give'), |
|
1343 | + 'IM' => __('Imperia', 'give'), |
|
1344 | + 'IS' => __('Isernia', 'give'), |
|
1345 | + 'SP' => __('La Spezia', 'give'), |
|
1346 | + 'AQ' => __("L'Aquila", 'give'), |
|
1347 | + 'LT' => __('Latina', 'give'), |
|
1348 | + 'LE' => __('Lecce', 'give'), |
|
1349 | + 'LC' => __('Lecco', 'give'), |
|
1350 | + 'LI' => __('Livorno', 'give'), |
|
1351 | + 'LO' => __('Lodi', 'give'), |
|
1352 | + 'LU' => __('Lucca', 'give'), |
|
1353 | + 'MC' => __('Macerata', 'give'), |
|
1354 | + 'MN' => __('Mantova', 'give'), |
|
1355 | + 'MS' => __('Massa-Carrara', 'give'), |
|
1356 | + 'MT' => __('Matera', 'give'), |
|
1357 | + 'ME' => __('Messina', 'give'), |
|
1358 | + 'MI' => __('Milano', 'give'), |
|
1359 | + 'MO' => __('Modena', 'give'), |
|
1360 | + 'MB' => __('Monza e della Brianza', 'give'), |
|
1361 | + 'NA' => __('Napoli', 'give'), |
|
1362 | + 'NO' => __('Novara', 'give'), |
|
1363 | + 'NU' => __('Nuoro', 'give'), |
|
1364 | + 'OT' => __('Olbia-Tempio', 'give'), |
|
1365 | + 'OR' => __('Oristano', 'give'), |
|
1366 | + 'PD' => __('Padova', 'give'), |
|
1367 | + 'PA' => __('Palermo', 'give'), |
|
1368 | + 'PR' => __('Parma', 'give'), |
|
1369 | + 'PV' => __('Pavia', 'give'), |
|
1370 | + 'PG' => __('Perugia', 'give'), |
|
1371 | + 'PU' => __('Pesaro e Urbino', 'give'), |
|
1372 | + 'PE' => __('Pescara', 'give'), |
|
1373 | + 'PC' => __('Piacenza', 'give'), |
|
1374 | + 'PI' => __('Pisa', 'give'), |
|
1375 | + 'PT' => __('Pistoia', 'give'), |
|
1376 | + 'PN' => __('Pordenone', 'give'), |
|
1377 | + 'PZ' => __('Potenza', 'give'), |
|
1378 | + 'PO' => __('Prato', 'give'), |
|
1379 | + 'RG' => __('Ragusa', 'give'), |
|
1380 | + 'RA' => __('Ravenna', 'give'), |
|
1381 | + 'RC' => __('Reggio Calabria', 'give'), |
|
1382 | + 'RE' => __('Reggio Emilia', 'give'), |
|
1383 | + 'RI' => __('Rieti', 'give'), |
|
1384 | + 'RN' => __('Rimini', 'give'), |
|
1385 | + 'RM' => __('Roma', 'give'), |
|
1386 | + 'RO' => __('Rovigo', 'give'), |
|
1387 | + 'SA' => __('Salerno', 'give'), |
|
1388 | + 'VS' => __('Medio Campidano', 'give'), |
|
1389 | + 'SS' => __('Sassari', 'give'), |
|
1390 | + 'SV' => __('Savona', 'give'), |
|
1391 | + 'SI' => __('Siena', 'give'), |
|
1392 | + 'SR' => __('Siracusa', 'give'), |
|
1393 | + 'SO' => __('Sondrio', 'give'), |
|
1394 | + 'TA' => __('Taranto', 'give'), |
|
1395 | + 'TE' => __('Teramo', 'give'), |
|
1396 | + 'TR' => __('Terni', 'give'), |
|
1397 | + 'TO' => __('Torino', 'give'), |
|
1398 | + 'OG' => __('Ogliastra', 'give'), |
|
1399 | + 'TP' => __('Trapani', 'give'), |
|
1400 | + 'TN' => __('Trento', 'give'), |
|
1401 | + 'TV' => __('Treviso', 'give'), |
|
1402 | + 'TS' => __('Trieste', 'give'), |
|
1403 | + 'UD' => __('Udine', 'give'), |
|
1404 | + 'VA' => __('Varese', 'give'), |
|
1405 | + 'VE' => __('Venezia', 'give'), |
|
1406 | + 'VB' => __('Verbano-Cusio-Ossola', 'give'), |
|
1407 | + 'VC' => __('Vercelli', 'give'), |
|
1408 | + 'VR' => __('Verona', 'give'), |
|
1409 | + 'VV' => __('Vibo Valentia', 'give'), |
|
1410 | + 'VI' => __('Vicenza', 'give'), |
|
1411 | + 'VT' => __('Viterbo', 'give'), |
|
1412 | 1412 | ); |
1413 | 1413 | |
1414 | - return apply_filters( 'give_italy_states', $states ); |
|
1414 | + return apply_filters('give_italy_states', $states); |
|
1415 | 1415 | } |
1416 | 1416 | |
1417 | 1417 | /** |
@@ -1423,40 +1423,40 @@ discard block |
||
1423 | 1423 | function give_get_iran_states_list() { |
1424 | 1424 | $states = array( |
1425 | 1425 | '' => '', |
1426 | - 'KHZ' => __( 'Khuzestan (خوزستان)', 'give' ), |
|
1427 | - 'THR' => __( 'Tehran (تهران)', 'give' ), |
|
1428 | - 'ILM' => __( 'Ilaam (ایلام)', 'give' ), |
|
1429 | - 'BHR' => __( 'Bushehr (بوشهر)', 'give' ), |
|
1430 | - 'ADL' => __( 'Ardabil (اردبیل)', 'give' ), |
|
1431 | - 'ESF' => __( 'Isfahan (اصفهان)', 'give' ), |
|
1432 | - 'YZD' => __( 'Yazd (یزد)', 'give' ), |
|
1433 | - 'KRH' => __( 'Kermanshah (کرمانشاه)', 'give' ), |
|
1434 | - 'KRN' => __( 'Kerman (کرمان)', 'give' ), |
|
1435 | - 'HDN' => __( 'Hamadan (همدان)', 'give' ), |
|
1436 | - 'GZN' => __( 'Ghazvin (قزوین)', 'give' ), |
|
1437 | - 'ZJN' => __( 'Zanjan (زنجان)', 'give' ), |
|
1438 | - 'LRS' => __( 'Luristan (لرستان)', 'give' ), |
|
1439 | - 'ABZ' => __( 'Alborz (البرز)', 'give' ), |
|
1440 | - 'EAZ' => __( 'East Azarbaijan (آذربایجان شرقی)', 'give' ), |
|
1441 | - 'WAZ' => __( 'West Azarbaijan (آذربایجان غربی)', 'give' ), |
|
1442 | - 'CHB' => __( 'Chaharmahal and Bakhtiari (چهارمحال و بختیاری)', 'give' ), |
|
1443 | - 'SKH' => __( 'South Khorasan (خراسان جنوبی)', 'give' ), |
|
1444 | - 'RKH' => __( 'Razavi Khorasan (خراسان رضوی)', 'give' ), |
|
1445 | - 'NKH' => __( 'North Khorasan (خراسان جنوبی)', 'give' ), |
|
1446 | - 'SMN' => __( 'Semnan (سمنان)', 'give' ), |
|
1447 | - 'FRS' => __( 'Fars (فارس)', 'give' ), |
|
1448 | - 'QHM' => __( 'Qom (قم)', 'give' ), |
|
1449 | - 'KRD' => __( 'Kurdistan / کردستان)', 'give' ), |
|
1450 | - 'KBD' => __( 'Kohgiluyeh and BoyerAhmad (کهگیلوییه و بویراحمد)', 'give' ), |
|
1451 | - 'GLS' => __( 'Golestan (گلستان)', 'give' ), |
|
1452 | - 'GIL' => __( 'Gilan (گیلان)', 'give' ), |
|
1453 | - 'MZN' => __( 'Mazandaran (مازندران)', 'give' ), |
|
1454 | - 'MKZ' => __( 'Markazi (مرکزی)', 'give' ), |
|
1455 | - 'HRZ' => __( 'Hormozgan (هرمزگان)', 'give' ), |
|
1456 | - 'SBN' => __( 'Sistan and Baluchestan (سیستان و بلوچستان)', 'give' ), |
|
1426 | + 'KHZ' => __('Khuzestan (خوزستان)', 'give'), |
|
1427 | + 'THR' => __('Tehran (تهران)', 'give'), |
|
1428 | + 'ILM' => __('Ilaam (ایلام)', 'give'), |
|
1429 | + 'BHR' => __('Bushehr (بوشهر)', 'give'), |
|
1430 | + 'ADL' => __('Ardabil (اردبیل)', 'give'), |
|
1431 | + 'ESF' => __('Isfahan (اصفهان)', 'give'), |
|
1432 | + 'YZD' => __('Yazd (یزد)', 'give'), |
|
1433 | + 'KRH' => __('Kermanshah (کرمانشاه)', 'give'), |
|
1434 | + 'KRN' => __('Kerman (کرمان)', 'give'), |
|
1435 | + 'HDN' => __('Hamadan (همدان)', 'give'), |
|
1436 | + 'GZN' => __('Ghazvin (قزوین)', 'give'), |
|
1437 | + 'ZJN' => __('Zanjan (زنجان)', 'give'), |
|
1438 | + 'LRS' => __('Luristan (لرستان)', 'give'), |
|
1439 | + 'ABZ' => __('Alborz (البرز)', 'give'), |
|
1440 | + 'EAZ' => __('East Azarbaijan (آذربایجان شرقی)', 'give'), |
|
1441 | + 'WAZ' => __('West Azarbaijan (آذربایجان غربی)', 'give'), |
|
1442 | + 'CHB' => __('Chaharmahal and Bakhtiari (چهارمحال و بختیاری)', 'give'), |
|
1443 | + 'SKH' => __('South Khorasan (خراسان جنوبی)', 'give'), |
|
1444 | + 'RKH' => __('Razavi Khorasan (خراسان رضوی)', 'give'), |
|
1445 | + 'NKH' => __('North Khorasan (خراسان جنوبی)', 'give'), |
|
1446 | + 'SMN' => __('Semnan (سمنان)', 'give'), |
|
1447 | + 'FRS' => __('Fars (فارس)', 'give'), |
|
1448 | + 'QHM' => __('Qom (قم)', 'give'), |
|
1449 | + 'KRD' => __('Kurdistan / کردستان)', 'give'), |
|
1450 | + 'KBD' => __('Kohgiluyeh and BoyerAhmad (کهگیلوییه و بویراحمد)', 'give'), |
|
1451 | + 'GLS' => __('Golestan (گلستان)', 'give'), |
|
1452 | + 'GIL' => __('Gilan (گیلان)', 'give'), |
|
1453 | + 'MZN' => __('Mazandaran (مازندران)', 'give'), |
|
1454 | + 'MKZ' => __('Markazi (مرکزی)', 'give'), |
|
1455 | + 'HRZ' => __('Hormozgan (هرمزگان)', 'give'), |
|
1456 | + 'SBN' => __('Sistan and Baluchestan (سیستان و بلوچستان)', 'give'), |
|
1457 | 1457 | ); |
1458 | 1458 | |
1459 | - return apply_filters( 'give_iran_states', $states ); |
|
1459 | + return apply_filters('give_iran_states', $states); |
|
1460 | 1460 | } |
1461 | 1461 | |
1462 | 1462 | /** |
@@ -1468,35 +1468,35 @@ discard block |
||
1468 | 1468 | function give_get_ireland_states_list() { |
1469 | 1469 | $states = array( |
1470 | 1470 | '' => '', |
1471 | - 'CE' => __( 'Clare', 'give' ), |
|
1472 | - 'CK' => __( 'Cork', 'give' ), |
|
1473 | - 'CN' => __( 'Cavan', 'give' ), |
|
1474 | - 'CW' => __( 'Carlow', 'give' ), |
|
1475 | - 'DL' => __( 'Donegal', 'give' ), |
|
1476 | - 'DN' => __( 'Dublin', 'give' ), |
|
1477 | - 'GY' => __( 'Galway', 'give' ), |
|
1478 | - 'KE' => __( 'Kildare', 'give' ), |
|
1479 | - 'KK' => __( 'Kilkenny', 'give' ), |
|
1480 | - 'KY' => __( 'Kerry', 'give' ), |
|
1481 | - 'LD' => __( 'Longford', 'give' ), |
|
1482 | - 'LH' => __( 'Louth', 'give' ), |
|
1483 | - 'LK' => __( 'Limerick', 'give' ), |
|
1484 | - 'LM' => __( 'Leitrim', 'give' ), |
|
1485 | - 'LS' => __( 'Laois', 'give' ), |
|
1486 | - 'MH' => __( 'Meath', 'give' ), |
|
1487 | - 'MN' => __( 'Monaghan', 'give' ), |
|
1488 | - 'MO' => __( 'Mayo', 'give' ), |
|
1489 | - 'OY' => __( 'Offaly', 'give' ), |
|
1490 | - 'RN' => __( 'Roscommon', 'give' ), |
|
1491 | - 'SO' => __( 'Sligo', 'give' ), |
|
1492 | - 'TY' => __( 'Tipperary', 'give' ), |
|
1493 | - 'WD' => __( 'Waterford', 'give' ), |
|
1494 | - 'WH' => __( 'Westmeath', 'give' ), |
|
1495 | - 'WW' => __( 'Wicklow', 'give' ), |
|
1496 | - 'WX' => __( 'Wexford', 'give' ), |
|
1471 | + 'CE' => __('Clare', 'give'), |
|
1472 | + 'CK' => __('Cork', 'give'), |
|
1473 | + 'CN' => __('Cavan', 'give'), |
|
1474 | + 'CW' => __('Carlow', 'give'), |
|
1475 | + 'DL' => __('Donegal', 'give'), |
|
1476 | + 'DN' => __('Dublin', 'give'), |
|
1477 | + 'GY' => __('Galway', 'give'), |
|
1478 | + 'KE' => __('Kildare', 'give'), |
|
1479 | + 'KK' => __('Kilkenny', 'give'), |
|
1480 | + 'KY' => __('Kerry', 'give'), |
|
1481 | + 'LD' => __('Longford', 'give'), |
|
1482 | + 'LH' => __('Louth', 'give'), |
|
1483 | + 'LK' => __('Limerick', 'give'), |
|
1484 | + 'LM' => __('Leitrim', 'give'), |
|
1485 | + 'LS' => __('Laois', 'give'), |
|
1486 | + 'MH' => __('Meath', 'give'), |
|
1487 | + 'MN' => __('Monaghan', 'give'), |
|
1488 | + 'MO' => __('Mayo', 'give'), |
|
1489 | + 'OY' => __('Offaly', 'give'), |
|
1490 | + 'RN' => __('Roscommon', 'give'), |
|
1491 | + 'SO' => __('Sligo', 'give'), |
|
1492 | + 'TY' => __('Tipperary', 'give'), |
|
1493 | + 'WD' => __('Waterford', 'give'), |
|
1494 | + 'WH' => __('Westmeath', 'give'), |
|
1495 | + 'WW' => __('Wicklow', 'give'), |
|
1496 | + 'WX' => __('Wexford', 'give'), |
|
1497 | 1497 | ); |
1498 | 1498 | |
1499 | - return apply_filters( 'give_ireland_states', $states ); |
|
1499 | + return apply_filters('give_ireland_states', $states); |
|
1500 | 1500 | } |
1501 | 1501 | |
1502 | 1502 | /** |
@@ -1508,22 +1508,22 @@ discard block |
||
1508 | 1508 | function give_get_greek_states_list() { |
1509 | 1509 | $states = array( |
1510 | 1510 | '' => '', |
1511 | - 'I' => __( 'Αττική', 'give' ), |
|
1512 | - 'A' => __( 'Ανατολική Μακεδονία και Θράκη', 'give' ), |
|
1513 | - 'B' => __( 'Κεντρική Μακεδονία', 'give' ), |
|
1514 | - 'C' => __( 'Δυτική Μακεδονία', 'give' ), |
|
1515 | - 'D' => __( 'Ήπειρος', 'give' ), |
|
1516 | - 'E' => __( 'Θεσσαλία', 'give' ), |
|
1517 | - 'F' => __( 'Ιόνιοι Νήσοι', 'give' ), |
|
1518 | - 'G' => __( 'Δυτική Ελλάδα', 'give' ), |
|
1519 | - 'H' => __( 'Στερεά Ελλάδα', 'give' ), |
|
1520 | - 'J' => __( 'Πελοπόννησος', 'give' ), |
|
1521 | - 'K' => __( 'Βόρειο Αιγαίο', 'give' ), |
|
1522 | - 'L' => __( 'Νότιο Αιγαίο', 'give' ), |
|
1523 | - 'M' => __( 'Κρήτη', 'give' ), |
|
1511 | + 'I' => __('Αττική', 'give'), |
|
1512 | + 'A' => __('Ανατολική Μακεδονία και Θράκη', 'give'), |
|
1513 | + 'B' => __('Κεντρική Μακεδονία', 'give'), |
|
1514 | + 'C' => __('Δυτική Μακεδονία', 'give'), |
|
1515 | + 'D' => __('Ήπειρος', 'give'), |
|
1516 | + 'E' => __('Θεσσαλία', 'give'), |
|
1517 | + 'F' => __('Ιόνιοι Νήσοι', 'give'), |
|
1518 | + 'G' => __('Δυτική Ελλάδα', 'give'), |
|
1519 | + 'H' => __('Στερεά Ελλάδα', 'give'), |
|
1520 | + 'J' => __('Πελοπόννησος', 'give'), |
|
1521 | + 'K' => __('Βόρειο Αιγαίο', 'give'), |
|
1522 | + 'L' => __('Νότιο Αιγαίο', 'give'), |
|
1523 | + 'M' => __('Κρήτη', 'give'), |
|
1524 | 1524 | ); |
1525 | 1525 | |
1526 | - return apply_filters( 'give_greek_states', $states ); |
|
1526 | + return apply_filters('give_greek_states', $states); |
|
1527 | 1527 | } |
1528 | 1528 | |
1529 | 1529 | /** |
@@ -1535,18 +1535,18 @@ discard block |
||
1535 | 1535 | function give_get_bolivian_states_list() { |
1536 | 1536 | $states = array( |
1537 | 1537 | '' => '', |
1538 | - 'B' => __( 'Chuquisaca', 'give' ), |
|
1539 | - 'H' => __( 'Beni', 'give' ), |
|
1540 | - 'C' => __( 'Cochabamba', 'give' ), |
|
1541 | - 'L' => __( 'La Paz', 'give' ), |
|
1542 | - 'O' => __( 'Oruro', 'give' ), |
|
1543 | - 'N' => __( 'Pando', 'give' ), |
|
1544 | - 'P' => __( 'Potosí', 'give' ), |
|
1545 | - 'S' => __( 'Santa Cruz', 'give' ), |
|
1546 | - 'T' => __( 'Tarija', 'give' ), |
|
1538 | + 'B' => __('Chuquisaca', 'give'), |
|
1539 | + 'H' => __('Beni', 'give'), |
|
1540 | + 'C' => __('Cochabamba', 'give'), |
|
1541 | + 'L' => __('La Paz', 'give'), |
|
1542 | + 'O' => __('Oruro', 'give'), |
|
1543 | + 'N' => __('Pando', 'give'), |
|
1544 | + 'P' => __('Potosí', 'give'), |
|
1545 | + 'S' => __('Santa Cruz', 'give'), |
|
1546 | + 'T' => __('Tarija', 'give'), |
|
1547 | 1547 | ); |
1548 | 1548 | |
1549 | - return apply_filters( 'give_bolivian_states', $states ); |
|
1549 | + return apply_filters('give_bolivian_states', $states); |
|
1550 | 1550 | } |
1551 | 1551 | |
1552 | 1552 | /** |
@@ -1558,37 +1558,37 @@ discard block |
||
1558 | 1558 | function give_get_bulgarian_states_list() { |
1559 | 1559 | $states = array( |
1560 | 1560 | '' => '', |
1561 | - 'BG-01' => __( 'Blagoevgrad', 'give' ), |
|
1562 | - 'BG-02' => __( 'Burgas', 'give' ), |
|
1563 | - 'BG-08' => __( 'Dobrich', 'give' ), |
|
1564 | - 'BG-07' => __( 'Gabrovo', 'give' ), |
|
1565 | - 'BG-26' => __( 'Haskovo', 'give' ), |
|
1566 | - 'BG-09' => __( 'Kardzhali', 'give' ), |
|
1567 | - 'BG-10' => __( 'Kyustendil', 'give' ), |
|
1568 | - 'BG-11' => __( 'Lovech', 'give' ), |
|
1569 | - 'BG-12' => __( 'Montana', 'give' ), |
|
1570 | - 'BG-13' => __( 'Pazardzhik', 'give' ), |
|
1571 | - 'BG-14' => __( 'Pernik', 'give' ), |
|
1572 | - 'BG-15' => __( 'Pleven', 'give' ), |
|
1573 | - 'BG-16' => __( 'Plovdiv', 'give' ), |
|
1574 | - 'BG-17' => __( 'Razgrad', 'give' ), |
|
1575 | - 'BG-18' => __( 'Ruse', 'give' ), |
|
1576 | - 'BG-27' => __( 'Shumen', 'give' ), |
|
1577 | - 'BG-19' => __( 'Silistra', 'give' ), |
|
1578 | - 'BG-20' => __( 'Sliven', 'give' ), |
|
1579 | - 'BG-21' => __( 'Smolyan', 'give' ), |
|
1580 | - 'BG-23' => __( 'Sofia', 'give' ), |
|
1581 | - 'BG-22' => __( 'Sofia-Grad', 'give' ), |
|
1582 | - 'BG-24' => __( 'Stara Zagora', 'give' ), |
|
1583 | - 'BG-25' => __( 'Targovishte', 'give' ), |
|
1584 | - 'BG-03' => __( 'Varna', 'give' ), |
|
1585 | - 'BG-04' => __( 'Veliko Tarnovo', 'give' ), |
|
1586 | - 'BG-05' => __( 'Vidin', 'give' ), |
|
1587 | - 'BG-06' => __( 'Vratsa', 'give' ), |
|
1588 | - 'BG-28' => __( 'Yambol', 'give' ), |
|
1561 | + 'BG-01' => __('Blagoevgrad', 'give'), |
|
1562 | + 'BG-02' => __('Burgas', 'give'), |
|
1563 | + 'BG-08' => __('Dobrich', 'give'), |
|
1564 | + 'BG-07' => __('Gabrovo', 'give'), |
|
1565 | + 'BG-26' => __('Haskovo', 'give'), |
|
1566 | + 'BG-09' => __('Kardzhali', 'give'), |
|
1567 | + 'BG-10' => __('Kyustendil', 'give'), |
|
1568 | + 'BG-11' => __('Lovech', 'give'), |
|
1569 | + 'BG-12' => __('Montana', 'give'), |
|
1570 | + 'BG-13' => __('Pazardzhik', 'give'), |
|
1571 | + 'BG-14' => __('Pernik', 'give'), |
|
1572 | + 'BG-15' => __('Pleven', 'give'), |
|
1573 | + 'BG-16' => __('Plovdiv', 'give'), |
|
1574 | + 'BG-17' => __('Razgrad', 'give'), |
|
1575 | + 'BG-18' => __('Ruse', 'give'), |
|
1576 | + 'BG-27' => __('Shumen', 'give'), |
|
1577 | + 'BG-19' => __('Silistra', 'give'), |
|
1578 | + 'BG-20' => __('Sliven', 'give'), |
|
1579 | + 'BG-21' => __('Smolyan', 'give'), |
|
1580 | + 'BG-23' => __('Sofia', 'give'), |
|
1581 | + 'BG-22' => __('Sofia-Grad', 'give'), |
|
1582 | + 'BG-24' => __('Stara Zagora', 'give'), |
|
1583 | + 'BG-25' => __('Targovishte', 'give'), |
|
1584 | + 'BG-03' => __('Varna', 'give'), |
|
1585 | + 'BG-04' => __('Veliko Tarnovo', 'give'), |
|
1586 | + 'BG-05' => __('Vidin', 'give'), |
|
1587 | + 'BG-06' => __('Vratsa', 'give'), |
|
1588 | + 'BG-28' => __('Yambol', 'give'), |
|
1589 | 1589 | ); |
1590 | 1590 | |
1591 | - return apply_filters( 'give_bulgarian_states', $states ); |
|
1591 | + return apply_filters('give_bulgarian_states', $states); |
|
1592 | 1592 | } |
1593 | 1593 | |
1594 | 1594 | /** |
@@ -1600,73 +1600,73 @@ discard block |
||
1600 | 1600 | function give_get_bangladeshi_states_list() { |
1601 | 1601 | $states = array( |
1602 | 1602 | '' => '', |
1603 | - 'BAG' => __( 'Bagerhat', 'give' ), |
|
1604 | - 'BAN' => __( 'Bandarban', 'give' ), |
|
1605 | - 'BAR' => __( 'Barguna', 'give' ), |
|
1606 | - 'BARI' => __( 'Barisal', 'give' ), |
|
1607 | - 'BHO' => __( 'Bhola', 'give' ), |
|
1608 | - 'BOG' => __( 'Bogra', 'give' ), |
|
1609 | - 'BRA' => __( 'Brahmanbaria', 'give' ), |
|
1610 | - 'CHA' => __( 'Chandpur', 'give' ), |
|
1611 | - 'CHI' => __( 'Chittagong', 'give' ), |
|
1612 | - 'CHU' => __( 'Chuadanga', 'give' ), |
|
1613 | - 'COM' => __( 'Comilla', 'give' ), |
|
1614 | - 'COX' => __( "Cox's Bazar", 'give' ), |
|
1615 | - 'DHA' => __( 'Dhaka', 'give' ), |
|
1616 | - 'DIN' => __( 'Dinajpur', 'give' ), |
|
1617 | - 'FAR' => __( 'Faridpur ', 'give' ), |
|
1618 | - 'FEN' => __( 'Feni', 'give' ), |
|
1619 | - 'GAI' => __( 'Gaibandha', 'give' ), |
|
1620 | - 'GAZI' => __( 'Gazipur', 'give' ), |
|
1621 | - 'GOP' => __( 'Gopalganj', 'give' ), |
|
1622 | - 'HAB' => __( 'Habiganj', 'give' ), |
|
1623 | - 'JAM' => __( 'Jamalpur', 'give' ), |
|
1624 | - 'JES' => __( 'Jessore', 'give' ), |
|
1625 | - 'JHA' => __( 'Jhalokati', 'give' ), |
|
1626 | - 'JHE' => __( 'Jhenaidah', 'give' ), |
|
1627 | - 'JOY' => __( 'Joypurhat', 'give' ), |
|
1628 | - 'KHA' => __( 'Khagrachhari', 'give' ), |
|
1629 | - 'KHU' => __( 'Khulna', 'give' ), |
|
1630 | - 'KIS' => __( 'Kishoreganj', 'give' ), |
|
1631 | - 'KUR' => __( 'Kurigram', 'give' ), |
|
1632 | - 'KUS' => __( 'Kushtia', 'give' ), |
|
1633 | - 'LAK' => __( 'Lakshmipur', 'give' ), |
|
1634 | - 'LAL' => __( 'Lalmonirhat', 'give' ), |
|
1635 | - 'MAD' => __( 'Madaripur', 'give' ), |
|
1636 | - 'MAG' => __( 'Magura', 'give' ), |
|
1637 | - 'MAN' => __( 'Manikganj ', 'give' ), |
|
1638 | - 'MEH' => __( 'Meherpur', 'give' ), |
|
1639 | - 'MOU' => __( 'Moulvibazar', 'give' ), |
|
1640 | - 'MUN' => __( 'Munshiganj', 'give' ), |
|
1641 | - 'MYM' => __( 'Mymensingh', 'give' ), |
|
1642 | - 'NAO' => __( 'Naogaon', 'give' ), |
|
1643 | - 'NAR' => __( 'Narail', 'give' ), |
|
1644 | - 'NARG' => __( 'Narayanganj', 'give' ), |
|
1645 | - 'NARD' => __( 'Narsingdi', 'give' ), |
|
1646 | - 'NAT' => __( 'Natore', 'give' ), |
|
1647 | - 'NAW' => __( 'Nawabganj', 'give' ), |
|
1648 | - 'NET' => __( 'Netrakona', 'give' ), |
|
1649 | - 'NIL' => __( 'Nilphamari', 'give' ), |
|
1650 | - 'NOA' => __( 'Noakhali', 'give' ), |
|
1651 | - 'PAB' => __( 'Pabna', 'give' ), |
|
1652 | - 'PAN' => __( 'Panchagarh', 'give' ), |
|
1653 | - 'PAT' => __( 'Patuakhali', 'give' ), |
|
1654 | - 'PIR' => __( 'Pirojpur', 'give' ), |
|
1655 | - 'RAJB' => __( 'Rajbari', 'give' ), |
|
1656 | - 'RAJ' => __( 'Rajshahi', 'give' ), |
|
1657 | - 'RAN' => __( 'Rangamati', 'give' ), |
|
1658 | - 'RANP' => __( 'Rangpur', 'give' ), |
|
1659 | - 'SAT' => __( 'Satkhira', 'give' ), |
|
1660 | - 'SHA' => __( 'Shariatpur', 'give' ), |
|
1661 | - 'SHE' => __( 'Sherpur', 'give' ), |
|
1662 | - 'SIR' => __( 'Sirajganj', 'give' ), |
|
1663 | - 'SUN' => __( 'Sunamganj', 'give' ), |
|
1664 | - 'SYL' => __( 'Sylhet', 'give' ), |
|
1665 | - 'TAN' => __( 'Tangail', 'give' ), |
|
1666 | - 'THA' => __( 'Thakurgaon', 'give' ), |
|
1603 | + 'BAG' => __('Bagerhat', 'give'), |
|
1604 | + 'BAN' => __('Bandarban', 'give'), |
|
1605 | + 'BAR' => __('Barguna', 'give'), |
|
1606 | + 'BARI' => __('Barisal', 'give'), |
|
1607 | + 'BHO' => __('Bhola', 'give'), |
|
1608 | + 'BOG' => __('Bogra', 'give'), |
|
1609 | + 'BRA' => __('Brahmanbaria', 'give'), |
|
1610 | + 'CHA' => __('Chandpur', 'give'), |
|
1611 | + 'CHI' => __('Chittagong', 'give'), |
|
1612 | + 'CHU' => __('Chuadanga', 'give'), |
|
1613 | + 'COM' => __('Comilla', 'give'), |
|
1614 | + 'COX' => __("Cox's Bazar", 'give'), |
|
1615 | + 'DHA' => __('Dhaka', 'give'), |
|
1616 | + 'DIN' => __('Dinajpur', 'give'), |
|
1617 | + 'FAR' => __('Faridpur ', 'give'), |
|
1618 | + 'FEN' => __('Feni', 'give'), |
|
1619 | + 'GAI' => __('Gaibandha', 'give'), |
|
1620 | + 'GAZI' => __('Gazipur', 'give'), |
|
1621 | + 'GOP' => __('Gopalganj', 'give'), |
|
1622 | + 'HAB' => __('Habiganj', 'give'), |
|
1623 | + 'JAM' => __('Jamalpur', 'give'), |
|
1624 | + 'JES' => __('Jessore', 'give'), |
|
1625 | + 'JHA' => __('Jhalokati', 'give'), |
|
1626 | + 'JHE' => __('Jhenaidah', 'give'), |
|
1627 | + 'JOY' => __('Joypurhat', 'give'), |
|
1628 | + 'KHA' => __('Khagrachhari', 'give'), |
|
1629 | + 'KHU' => __('Khulna', 'give'), |
|
1630 | + 'KIS' => __('Kishoreganj', 'give'), |
|
1631 | + 'KUR' => __('Kurigram', 'give'), |
|
1632 | + 'KUS' => __('Kushtia', 'give'), |
|
1633 | + 'LAK' => __('Lakshmipur', 'give'), |
|
1634 | + 'LAL' => __('Lalmonirhat', 'give'), |
|
1635 | + 'MAD' => __('Madaripur', 'give'), |
|
1636 | + 'MAG' => __('Magura', 'give'), |
|
1637 | + 'MAN' => __('Manikganj ', 'give'), |
|
1638 | + 'MEH' => __('Meherpur', 'give'), |
|
1639 | + 'MOU' => __('Moulvibazar', 'give'), |
|
1640 | + 'MUN' => __('Munshiganj', 'give'), |
|
1641 | + 'MYM' => __('Mymensingh', 'give'), |
|
1642 | + 'NAO' => __('Naogaon', 'give'), |
|
1643 | + 'NAR' => __('Narail', 'give'), |
|
1644 | + 'NARG' => __('Narayanganj', 'give'), |
|
1645 | + 'NARD' => __('Narsingdi', 'give'), |
|
1646 | + 'NAT' => __('Natore', 'give'), |
|
1647 | + 'NAW' => __('Nawabganj', 'give'), |
|
1648 | + 'NET' => __('Netrakona', 'give'), |
|
1649 | + 'NIL' => __('Nilphamari', 'give'), |
|
1650 | + 'NOA' => __('Noakhali', 'give'), |
|
1651 | + 'PAB' => __('Pabna', 'give'), |
|
1652 | + 'PAN' => __('Panchagarh', 'give'), |
|
1653 | + 'PAT' => __('Patuakhali', 'give'), |
|
1654 | + 'PIR' => __('Pirojpur', 'give'), |
|
1655 | + 'RAJB' => __('Rajbari', 'give'), |
|
1656 | + 'RAJ' => __('Rajshahi', 'give'), |
|
1657 | + 'RAN' => __('Rangamati', 'give'), |
|
1658 | + 'RANP' => __('Rangpur', 'give'), |
|
1659 | + 'SAT' => __('Satkhira', 'give'), |
|
1660 | + 'SHA' => __('Shariatpur', 'give'), |
|
1661 | + 'SHE' => __('Sherpur', 'give'), |
|
1662 | + 'SIR' => __('Sirajganj', 'give'), |
|
1663 | + 'SUN' => __('Sunamganj', 'give'), |
|
1664 | + 'SYL' => __('Sylhet', 'give'), |
|
1665 | + 'TAN' => __('Tangail', 'give'), |
|
1666 | + 'THA' => __('Thakurgaon', 'give'), |
|
1667 | 1667 | ); |
1668 | 1668 | |
1669 | - return apply_filters( 'give_bangladeshi_states', $states ); |
|
1669 | + return apply_filters('give_bangladeshi_states', $states); |
|
1670 | 1670 | } |
1671 | 1671 | |
1672 | 1672 | /** |
@@ -1678,33 +1678,33 @@ discard block |
||
1678 | 1678 | function give_get_argentina_states_list() { |
1679 | 1679 | $states = array( |
1680 | 1680 | '' => '', |
1681 | - 'C' => __( 'Ciudad Autónoma de Buenos Aires', 'give' ), |
|
1682 | - 'B' => __( 'Buenos Aires', 'give' ), |
|
1683 | - 'K' => __( 'Catamarca', 'give' ), |
|
1684 | - 'H' => __( 'Chaco', 'give' ), |
|
1685 | - 'U' => __( 'Chubut', 'give' ), |
|
1686 | - 'X' => __( 'Córdoba', 'give' ), |
|
1687 | - 'W' => __( 'Corrientes', 'give' ), |
|
1688 | - 'E' => __( 'Entre Ríos', 'give' ), |
|
1689 | - 'P' => __( 'Formosa', 'give' ), |
|
1690 | - 'Y' => __( 'Jujuy', 'give' ), |
|
1691 | - 'L' => __( 'La Pampa', 'give' ), |
|
1692 | - 'F' => __( 'La Rioja', 'give' ), |
|
1693 | - 'M' => __( 'Mendoza', 'give' ), |
|
1694 | - 'N' => __( 'Misiones', 'give' ), |
|
1695 | - 'Q' => __( 'Neuquén', 'give' ), |
|
1696 | - 'R' => __( 'Río Negro', 'give' ), |
|
1697 | - 'A' => __( 'Salta', 'give' ), |
|
1698 | - 'J' => __( 'San Juan', 'give' ), |
|
1699 | - 'D' => __( 'San Luis', 'give' ), |
|
1700 | - 'Z' => __( 'Santa Cruz', 'give' ), |
|
1701 | - 'S' => __( 'Santa Fe', 'give' ), |
|
1702 | - 'G' => __( 'Santiago del Estero', 'give' ), |
|
1703 | - 'V' => __( 'Tierra del Fuego', 'give' ), |
|
1704 | - 'T' => __( 'Tucumán', 'give' ), |
|
1681 | + 'C' => __('Ciudad Autónoma de Buenos Aires', 'give'), |
|
1682 | + 'B' => __('Buenos Aires', 'give'), |
|
1683 | + 'K' => __('Catamarca', 'give'), |
|
1684 | + 'H' => __('Chaco', 'give'), |
|
1685 | + 'U' => __('Chubut', 'give'), |
|
1686 | + 'X' => __('Córdoba', 'give'), |
|
1687 | + 'W' => __('Corrientes', 'give'), |
|
1688 | + 'E' => __('Entre Ríos', 'give'), |
|
1689 | + 'P' => __('Formosa', 'give'), |
|
1690 | + 'Y' => __('Jujuy', 'give'), |
|
1691 | + 'L' => __('La Pampa', 'give'), |
|
1692 | + 'F' => __('La Rioja', 'give'), |
|
1693 | + 'M' => __('Mendoza', 'give'), |
|
1694 | + 'N' => __('Misiones', 'give'), |
|
1695 | + 'Q' => __('Neuquén', 'give'), |
|
1696 | + 'R' => __('Río Negro', 'give'), |
|
1697 | + 'A' => __('Salta', 'give'), |
|
1698 | + 'J' => __('San Juan', 'give'), |
|
1699 | + 'D' => __('San Luis', 'give'), |
|
1700 | + 'Z' => __('Santa Cruz', 'give'), |
|
1701 | + 'S' => __('Santa Fe', 'give'), |
|
1702 | + 'G' => __('Santiago del Estero', 'give'), |
|
1703 | + 'V' => __('Tierra del Fuego', 'give'), |
|
1704 | + 'T' => __('Tucumán', 'give'), |
|
1705 | 1705 | ); |
1706 | 1706 | |
1707 | - return apply_filters( 'give_argentina_states', $states ); |
|
1707 | + return apply_filters('give_argentina_states', $states); |
|
1708 | 1708 | } |
1709 | 1709 | |
1710 | 1710 | /** |
@@ -1785,7 +1785,7 @@ discard block |
||
1785 | 1785 | 'AP' => 'Armed Forces - Pacific', |
1786 | 1786 | ); |
1787 | 1787 | |
1788 | - return apply_filters( 'give_us_states', $states ); |
|
1788 | + return apply_filters('give_us_states', $states); |
|
1789 | 1789 | } |
1790 | 1790 | |
1791 | 1791 | /** |
@@ -1798,22 +1798,22 @@ discard block |
||
1798 | 1798 | function give_get_provinces_list() { |
1799 | 1799 | $provinces = array( |
1800 | 1800 | '' => '', |
1801 | - 'AB' => esc_html__( 'Alberta', 'give' ), |
|
1802 | - 'BC' => esc_html__( 'British Columbia', 'give' ), |
|
1803 | - 'MB' => esc_html__( 'Manitoba', 'give' ), |
|
1804 | - 'NB' => esc_html__( 'New Brunswick', 'give' ), |
|
1805 | - 'NL' => esc_html__( 'Newfoundland and Labrador', 'give' ), |
|
1806 | - 'NS' => esc_html__( 'Nova Scotia', 'give' ), |
|
1807 | - 'NT' => esc_html__( 'Northwest Territories', 'give' ), |
|
1808 | - 'NU' => esc_html__( 'Nunavut', 'give' ), |
|
1809 | - 'ON' => esc_html__( 'Ontario', 'give' ), |
|
1810 | - 'PE' => esc_html__( 'Prince Edward Island', 'give' ), |
|
1811 | - 'QC' => esc_html__( 'Quebec', 'give' ), |
|
1812 | - 'SK' => esc_html__( 'Saskatchewan', 'give' ), |
|
1813 | - 'YT' => esc_html__( 'Yukon', 'give' ), |
|
1801 | + 'AB' => esc_html__('Alberta', 'give'), |
|
1802 | + 'BC' => esc_html__('British Columbia', 'give'), |
|
1803 | + 'MB' => esc_html__('Manitoba', 'give'), |
|
1804 | + 'NB' => esc_html__('New Brunswick', 'give'), |
|
1805 | + 'NL' => esc_html__('Newfoundland and Labrador', 'give'), |
|
1806 | + 'NS' => esc_html__('Nova Scotia', 'give'), |
|
1807 | + 'NT' => esc_html__('Northwest Territories', 'give'), |
|
1808 | + 'NU' => esc_html__('Nunavut', 'give'), |
|
1809 | + 'ON' => esc_html__('Ontario', 'give'), |
|
1810 | + 'PE' => esc_html__('Prince Edward Island', 'give'), |
|
1811 | + 'QC' => esc_html__('Quebec', 'give'), |
|
1812 | + 'SK' => esc_html__('Saskatchewan', 'give'), |
|
1813 | + 'YT' => esc_html__('Yukon', 'give'), |
|
1814 | 1814 | ); |
1815 | 1815 | |
1816 | - return apply_filters( 'give_canada_provinces', $provinces ); |
|
1816 | + return apply_filters('give_canada_provinces', $provinces); |
|
1817 | 1817 | } |
1818 | 1818 | |
1819 | 1819 | /** |
@@ -1835,7 +1835,7 @@ discard block |
||
1835 | 1835 | 'WA' => 'Western Australia', |
1836 | 1836 | ); |
1837 | 1837 | |
1838 | - return apply_filters( 'give_australian_states', $states ); |
|
1838 | + return apply_filters('give_australian_states', $states); |
|
1839 | 1839 | } |
1840 | 1840 | |
1841 | 1841 | /** |
@@ -1876,7 +1876,7 @@ discard block |
||
1876 | 1876 | 'TO' => 'Tocantins', |
1877 | 1877 | ); |
1878 | 1878 | |
1879 | - return apply_filters( 'give_brazil_states', $states ); |
|
1879 | + return apply_filters('give_brazil_states', $states); |
|
1880 | 1880 | } |
1881 | 1881 | |
1882 | 1882 | /** |
@@ -1893,7 +1893,7 @@ discard block |
||
1893 | 1893 | 'NEW TERRITORIES' => 'New Territories', |
1894 | 1894 | ); |
1895 | 1895 | |
1896 | - return apply_filters( 'give_hong_kong_states', $states ); |
|
1896 | + return apply_filters('give_hong_kong_states', $states); |
|
1897 | 1897 | } |
1898 | 1898 | |
1899 | 1899 | /** |
@@ -1927,7 +1927,7 @@ discard block |
||
1927 | 1927 | 'ZA' => 'Zala', |
1928 | 1928 | ); |
1929 | 1929 | |
1930 | - return apply_filters( 'give_hungary_states', $states ); |
|
1930 | + return apply_filters('give_hungary_states', $states); |
|
1931 | 1931 | } |
1932 | 1932 | |
1933 | 1933 | /** |
@@ -1973,7 +1973,7 @@ discard block |
||
1973 | 1973 | 'CN32' => 'Xinjiang / 新疆', |
1974 | 1974 | ); |
1975 | 1975 | |
1976 | - return apply_filters( 'give_chinese_states', $states ); |
|
1976 | + return apply_filters('give_chinese_states', $states); |
|
1977 | 1977 | } |
1978 | 1978 | |
1979 | 1979 | /** |
@@ -2002,7 +2002,7 @@ discard block |
||
2002 | 2002 | 'WC' => 'West Coast', |
2003 | 2003 | ); |
2004 | 2004 | |
2005 | - return apply_filters( 'give_new_zealand_states', $states ); |
|
2005 | + return apply_filters('give_new_zealand_states', $states); |
|
2006 | 2006 | } |
2007 | 2007 | |
2008 | 2008 | /** |
@@ -2050,7 +2050,7 @@ discard block |
||
2050 | 2050 | 'PB' => 'Papua Barat', |
2051 | 2051 | ); |
2052 | 2052 | |
2053 | - return apply_filters( 'give_indonesia_states', $states ); |
|
2053 | + return apply_filters('give_indonesia_states', $states); |
|
2054 | 2054 | } |
2055 | 2055 | |
2056 | 2056 | /** |
@@ -2100,7 +2100,7 @@ discard block |
||
2100 | 2100 | 'PY' => 'Pondicherry (Puducherry)', |
2101 | 2101 | ); |
2102 | 2102 | |
2103 | - return apply_filters( 'give_indian_states', $states ); |
|
2103 | + return apply_filters('give_indian_states', $states); |
|
2104 | 2104 | } |
2105 | 2105 | |
2106 | 2106 | /** |
@@ -2130,7 +2130,7 @@ discard block |
||
2130 | 2130 | 'PJY' => 'W.P. Putrajaya', |
2131 | 2131 | ); |
2132 | 2132 | |
2133 | - return apply_filters( 'give_malaysian_states', $states ); |
|
2133 | + return apply_filters('give_malaysian_states', $states); |
|
2134 | 2134 | } |
2135 | 2135 | |
2136 | 2136 | /** |
@@ -2153,7 +2153,7 @@ discard block |
||
2153 | 2153 | 'WC' => 'Western Cape', |
2154 | 2154 | ); |
2155 | 2155 | |
2156 | - return apply_filters( 'give_south_african_states', $states ); |
|
2156 | + return apply_filters('give_south_african_states', $states); |
|
2157 | 2157 | } |
2158 | 2158 | |
2159 | 2159 | /** |
@@ -2244,7 +2244,7 @@ discard block |
||
2244 | 2244 | 'TH-35' => 'Yasothon (ยโสธร)', |
2245 | 2245 | ); |
2246 | 2246 | |
2247 | - return apply_filters( 'give_thailand_states', $states ); |
|
2247 | + return apply_filters('give_thailand_states', $states); |
|
2248 | 2248 | } |
2249 | 2249 | |
2250 | 2250 | /** |
@@ -2256,59 +2256,59 @@ discard block |
||
2256 | 2256 | function give_get_spain_states_list() { |
2257 | 2257 | $states = array( |
2258 | 2258 | '' => '', |
2259 | - 'C' => esc_html__( 'A Coruña', 'give' ), |
|
2260 | - 'VI' => esc_html__( 'Álava', 'give' ), |
|
2261 | - 'AB' => esc_html__( 'Albacete', 'give' ), |
|
2262 | - 'A' => esc_html__( 'Alicante', 'give' ), |
|
2263 | - 'AL' => esc_html__( 'Almería', 'give' ), |
|
2264 | - 'O' => esc_html__( 'Asturias', 'give' ), |
|
2265 | - 'AV' => esc_html__( 'Ávila', 'give' ), |
|
2266 | - 'BA' => esc_html__( 'Badajoz', 'give' ), |
|
2267 | - 'PM' => esc_html__( 'Baleares', 'give' ), |
|
2268 | - 'B' => esc_html__( 'Barcelona', 'give' ), |
|
2269 | - 'BU' => esc_html__( 'Burgos', 'give' ), |
|
2270 | - 'CC' => esc_html__( 'Cáceres', 'give' ), |
|
2271 | - 'CA' => esc_html__( 'Cádiz', 'give' ), |
|
2272 | - 'S' => esc_html__( 'Cantabria', 'give' ), |
|
2273 | - 'CS' => esc_html__( 'Castellón', 'give' ), |
|
2274 | - 'CE' => esc_html__( 'Ceuta', 'give' ), |
|
2275 | - 'CR' => esc_html__( 'Ciudad Real', 'give' ), |
|
2276 | - 'CO' => esc_html__( 'Córdoba', 'give' ), |
|
2277 | - 'CU' => esc_html__( 'Cuenca', 'give' ), |
|
2278 | - 'GI' => esc_html__( 'Girona', 'give' ), |
|
2279 | - 'GR' => esc_html__( 'Granada', 'give' ), |
|
2280 | - 'GU' => esc_html__( 'Guadalajara', 'give' ), |
|
2281 | - 'SS' => esc_html__( 'Gipuzkoa', 'give' ), |
|
2282 | - 'H' => esc_html__( 'Huelva', 'give' ), |
|
2283 | - 'HU' => esc_html__( 'Huesca', 'give' ), |
|
2284 | - 'J' => esc_html__( 'Jaén', 'give' ), |
|
2285 | - 'LO' => esc_html__( 'La Rioja', 'give' ), |
|
2286 | - 'GC' => esc_html__( 'Las Palmas', 'give' ), |
|
2287 | - 'LE' => esc_html__( 'León', 'give' ), |
|
2288 | - 'L' => esc_html__( 'Lleida', 'give' ), |
|
2289 | - 'LU' => esc_html__( 'Lugo', 'give' ), |
|
2290 | - 'M' => esc_html__( 'Madrid', 'give' ), |
|
2291 | - 'MA' => esc_html__( 'Málaga', 'give' ), |
|
2292 | - 'ML' => esc_html__( 'Melilla', 'give' ), |
|
2293 | - 'MU' => esc_html__( 'Murcia', 'give' ), |
|
2294 | - 'NA' => esc_html__( 'Navarra', 'give' ), |
|
2295 | - 'OR' => esc_html__( 'Ourense', 'give' ), |
|
2296 | - 'P' => esc_html__( 'Palencia', 'give' ), |
|
2297 | - 'PO' => esc_html__( 'Pontevedra', 'give' ), |
|
2298 | - 'SA' => esc_html__( 'Salamanca', 'give' ), |
|
2299 | - 'TF' => esc_html__( 'Santa Cruz de Tenerife', 'give' ), |
|
2300 | - 'SG' => esc_html__( 'Segovia', 'give' ), |
|
2301 | - 'SE' => esc_html__( 'Sevilla', 'give' ), |
|
2302 | - 'SO' => esc_html__( 'Soria', 'give' ), |
|
2303 | - 'T' => esc_html__( 'Tarragona', 'give' ), |
|
2304 | - 'TE' => esc_html__( 'Teruel', 'give' ), |
|
2305 | - 'TO' => esc_html__( 'Toledo', 'give' ), |
|
2306 | - 'V' => esc_html__( 'Valencia', 'give' ), |
|
2307 | - 'VA' => esc_html__( 'Valladolid', 'give' ), |
|
2308 | - 'BI' => esc_html__( 'Bizkaia', 'give' ), |
|
2309 | - 'ZA' => esc_html__( 'Zamora', 'give' ), |
|
2310 | - 'Z' => esc_html__( 'Zaragoza', 'give' ), |
|
2259 | + 'C' => esc_html__('A Coruña', 'give'), |
|
2260 | + 'VI' => esc_html__('Álava', 'give'), |
|
2261 | + 'AB' => esc_html__('Albacete', 'give'), |
|
2262 | + 'A' => esc_html__('Alicante', 'give'), |
|
2263 | + 'AL' => esc_html__('Almería', 'give'), |
|
2264 | + 'O' => esc_html__('Asturias', 'give'), |
|
2265 | + 'AV' => esc_html__('Ávila', 'give'), |
|
2266 | + 'BA' => esc_html__('Badajoz', 'give'), |
|
2267 | + 'PM' => esc_html__('Baleares', 'give'), |
|
2268 | + 'B' => esc_html__('Barcelona', 'give'), |
|
2269 | + 'BU' => esc_html__('Burgos', 'give'), |
|
2270 | + 'CC' => esc_html__('Cáceres', 'give'), |
|
2271 | + 'CA' => esc_html__('Cádiz', 'give'), |
|
2272 | + 'S' => esc_html__('Cantabria', 'give'), |
|
2273 | + 'CS' => esc_html__('Castellón', 'give'), |
|
2274 | + 'CE' => esc_html__('Ceuta', 'give'), |
|
2275 | + 'CR' => esc_html__('Ciudad Real', 'give'), |
|
2276 | + 'CO' => esc_html__('Córdoba', 'give'), |
|
2277 | + 'CU' => esc_html__('Cuenca', 'give'), |
|
2278 | + 'GI' => esc_html__('Girona', 'give'), |
|
2279 | + 'GR' => esc_html__('Granada', 'give'), |
|
2280 | + 'GU' => esc_html__('Guadalajara', 'give'), |
|
2281 | + 'SS' => esc_html__('Gipuzkoa', 'give'), |
|
2282 | + 'H' => esc_html__('Huelva', 'give'), |
|
2283 | + 'HU' => esc_html__('Huesca', 'give'), |
|
2284 | + 'J' => esc_html__('Jaén', 'give'), |
|
2285 | + 'LO' => esc_html__('La Rioja', 'give'), |
|
2286 | + 'GC' => esc_html__('Las Palmas', 'give'), |
|
2287 | + 'LE' => esc_html__('León', 'give'), |
|
2288 | + 'L' => esc_html__('Lleida', 'give'), |
|
2289 | + 'LU' => esc_html__('Lugo', 'give'), |
|
2290 | + 'M' => esc_html__('Madrid', 'give'), |
|
2291 | + 'MA' => esc_html__('Málaga', 'give'), |
|
2292 | + 'ML' => esc_html__('Melilla', 'give'), |
|
2293 | + 'MU' => esc_html__('Murcia', 'give'), |
|
2294 | + 'NA' => esc_html__('Navarra', 'give'), |
|
2295 | + 'OR' => esc_html__('Ourense', 'give'), |
|
2296 | + 'P' => esc_html__('Palencia', 'give'), |
|
2297 | + 'PO' => esc_html__('Pontevedra', 'give'), |
|
2298 | + 'SA' => esc_html__('Salamanca', 'give'), |
|
2299 | + 'TF' => esc_html__('Santa Cruz de Tenerife', 'give'), |
|
2300 | + 'SG' => esc_html__('Segovia', 'give'), |
|
2301 | + 'SE' => esc_html__('Sevilla', 'give'), |
|
2302 | + 'SO' => esc_html__('Soria', 'give'), |
|
2303 | + 'T' => esc_html__('Tarragona', 'give'), |
|
2304 | + 'TE' => esc_html__('Teruel', 'give'), |
|
2305 | + 'TO' => esc_html__('Toledo', 'give'), |
|
2306 | + 'V' => esc_html__('Valencia', 'give'), |
|
2307 | + 'VA' => esc_html__('Valladolid', 'give'), |
|
2308 | + 'BI' => esc_html__('Bizkaia', 'give'), |
|
2309 | + 'ZA' => esc_html__('Zamora', 'give'), |
|
2310 | + 'Z' => esc_html__('Zaragoza', 'give'), |
|
2311 | 2311 | ); |
2312 | 2312 | |
2313 | - return apply_filters( 'give_spain_states', $states ); |
|
2313 | + return apply_filters('give_spain_states', $states); |
|
2314 | 2314 | } |
@@ -12,7 +12,7 @@ discard block |
||
12 | 12 | */ |
13 | 13 | |
14 | 14 | // Exit if accessed directly. |
15 | -if ( ! defined( 'ABSPATH' ) ) { |
|
15 | +if ( ! defined('ABSPATH')) { |
|
16 | 16 | exit; |
17 | 17 | } |
18 | 18 | |
@@ -26,26 +26,26 @@ discard block |
||
26 | 26 | function give_test_ajax_works() { |
27 | 27 | |
28 | 28 | // Check if the Airplane Mode plugin is installed. |
29 | - if ( class_exists( 'Airplane_Mode_Core' ) ) { |
|
29 | + if (class_exists('Airplane_Mode_Core')) { |
|
30 | 30 | |
31 | 31 | $airplane = Airplane_Mode_Core::getInstance(); |
32 | 32 | |
33 | - if ( method_exists( $airplane, 'enabled' ) ) { |
|
33 | + if (method_exists($airplane, 'enabled')) { |
|
34 | 34 | |
35 | - if ( $airplane->enabled() ) { |
|
35 | + if ($airplane->enabled()) { |
|
36 | 36 | return true; |
37 | 37 | } |
38 | 38 | } else { |
39 | 39 | |
40 | - if ( 'on' === $airplane->check_status() ) { |
|
40 | + if ('on' === $airplane->check_status()) { |
|
41 | 41 | return true; |
42 | 42 | } |
43 | 43 | } |
44 | 44 | } |
45 | 45 | |
46 | - add_filter( 'block_local_requests', '__return_false' ); |
|
46 | + add_filter('block_local_requests', '__return_false'); |
|
47 | 47 | |
48 | - if ( Give_Cache::get( '_give_ajax_works', true ) ) { |
|
48 | + if (Give_Cache::get('_give_ajax_works', true)) { |
|
49 | 49 | return true; |
50 | 50 | } |
51 | 51 | |
@@ -57,35 +57,35 @@ discard block |
||
57 | 57 | ), |
58 | 58 | ); |
59 | 59 | |
60 | - $ajax = wp_remote_post( give_get_ajax_url(), $params ); |
|
60 | + $ajax = wp_remote_post(give_get_ajax_url(), $params); |
|
61 | 61 | |
62 | 62 | $works = true; |
63 | 63 | |
64 | - if ( is_wp_error( $ajax ) ) { |
|
64 | + if (is_wp_error($ajax)) { |
|
65 | 65 | |
66 | 66 | $works = false; |
67 | 67 | |
68 | 68 | } else { |
69 | 69 | |
70 | - if ( empty( $ajax['response'] ) ) { |
|
70 | + if (empty($ajax['response'])) { |
|
71 | 71 | $works = false; |
72 | 72 | } |
73 | 73 | |
74 | - if ( empty( $ajax['response']['code'] ) || 200 !== (int) $ajax['response']['code'] ) { |
|
74 | + if (empty($ajax['response']['code']) || 200 !== (int) $ajax['response']['code']) { |
|
75 | 75 | $works = false; |
76 | 76 | } |
77 | 77 | |
78 | - if ( empty( $ajax['response']['message'] ) || 'OK' !== $ajax['response']['message'] ) { |
|
78 | + if (empty($ajax['response']['message']) || 'OK' !== $ajax['response']['message']) { |
|
79 | 79 | $works = false; |
80 | 80 | } |
81 | 81 | |
82 | - if ( ! isset( $ajax['body'] ) || 0 !== (int) $ajax['body'] ) { |
|
82 | + if ( ! isset($ajax['body']) || 0 !== (int) $ajax['body']) { |
|
83 | 83 | $works = false; |
84 | 84 | } |
85 | 85 | } |
86 | 86 | |
87 | - if ( $works ) { |
|
88 | - Give_Cache::set( '_give_ajax_works', '1', DAY_IN_SECONDS, true ); |
|
87 | + if ($works) { |
|
88 | + Give_Cache::set('_give_ajax_works', '1', DAY_IN_SECONDS, true); |
|
89 | 89 | } |
90 | 90 | |
91 | 91 | return $works; |
@@ -100,16 +100,16 @@ discard block |
||
100 | 100 | * @return string |
101 | 101 | */ |
102 | 102 | function give_get_ajax_url() { |
103 | - $scheme = defined( 'FORCE_SSL_ADMIN' ) && FORCE_SSL_ADMIN ? 'https' : 'admin'; |
|
103 | + $scheme = defined('FORCE_SSL_ADMIN') && FORCE_SSL_ADMIN ? 'https' : 'admin'; |
|
104 | 104 | |
105 | 105 | $current_url = give_get_current_page_url(); |
106 | - $ajax_url = admin_url( 'admin-ajax.php', $scheme ); |
|
106 | + $ajax_url = admin_url('admin-ajax.php', $scheme); |
|
107 | 107 | |
108 | - if ( preg_match( '/^https/', $current_url ) && ! preg_match( '/^https/', $ajax_url ) ) { |
|
109 | - $ajax_url = preg_replace( '/^http/', 'https', $ajax_url ); |
|
108 | + if (preg_match('/^https/', $current_url) && ! preg_match('/^https/', $ajax_url)) { |
|
109 | + $ajax_url = preg_replace('/^http/', 'https', $ajax_url); |
|
110 | 110 | } |
111 | 111 | |
112 | - return apply_filters( 'give_ajax_url', $ajax_url ); |
|
112 | + return apply_filters('give_ajax_url', $ajax_url); |
|
113 | 113 | } |
114 | 114 | |
115 | 115 | /** |
@@ -125,12 +125,12 @@ discard block |
||
125 | 125 | * |
126 | 126 | * @since 1.7 |
127 | 127 | */ |
128 | - do_action( 'give_donation_form_login_fields' ); |
|
128 | + do_action('give_donation_form_login_fields'); |
|
129 | 129 | |
130 | 130 | give_die(); |
131 | 131 | } |
132 | 132 | |
133 | -add_action( 'wp_ajax_nopriv_give_checkout_login', 'give_load_checkout_login_fields' ); |
|
133 | +add_action('wp_ajax_nopriv_give_checkout_login', 'give_load_checkout_login_fields'); |
|
134 | 134 | |
135 | 135 | /** |
136 | 136 | * Load Checkout Fields |
@@ -140,7 +140,7 @@ discard block |
||
140 | 140 | * @return void |
141 | 141 | */ |
142 | 142 | function give_load_checkout_fields() { |
143 | - $form_id = isset( $_POST['form_id'] ) ? $_POST['form_id'] : ''; |
|
143 | + $form_id = isset($_POST['form_id']) ? $_POST['form_id'] : ''; |
|
144 | 144 | |
145 | 145 | ob_start(); |
146 | 146 | |
@@ -149,18 +149,18 @@ discard block |
||
149 | 149 | * |
150 | 150 | * @since 1.7 |
151 | 151 | */ |
152 | - do_action( 'give_donation_form_register_login_fields', $form_id ); |
|
152 | + do_action('give_donation_form_register_login_fields', $form_id); |
|
153 | 153 | |
154 | 154 | $fields = ob_get_clean(); |
155 | 155 | |
156 | - wp_send_json( array( |
|
157 | - 'fields' => wp_json_encode( $fields ), |
|
158 | - 'submit' => wp_json_encode( give_get_donation_form_submit_button( $form_id ) ), |
|
159 | - ) ); |
|
156 | + wp_send_json(array( |
|
157 | + 'fields' => wp_json_encode($fields), |
|
158 | + 'submit' => wp_json_encode(give_get_donation_form_submit_button($form_id)), |
|
159 | + )); |
|
160 | 160 | } |
161 | 161 | |
162 | -add_action( 'wp_ajax_nopriv_give_cancel_login', 'give_load_checkout_fields' ); |
|
163 | -add_action( 'wp_ajax_nopriv_give_checkout_register', 'give_load_checkout_fields' ); |
|
162 | +add_action('wp_ajax_nopriv_give_cancel_login', 'give_load_checkout_fields'); |
|
163 | +add_action('wp_ajax_nopriv_give_checkout_register', 'give_load_checkout_fields'); |
|
164 | 164 | |
165 | 165 | /** |
166 | 166 | * Get Form Title via AJAX (used only in WordPress Admin) |
@@ -170,9 +170,9 @@ discard block |
||
170 | 170 | * @return void |
171 | 171 | */ |
172 | 172 | function give_ajax_get_form_title() { |
173 | - if ( isset( $_POST['form_id'] ) ) { |
|
174 | - $title = get_the_title( $_POST['form_id'] ); |
|
175 | - if ( $title ) { |
|
173 | + if (isset($_POST['form_id'])) { |
|
174 | + $title = get_the_title($_POST['form_id']); |
|
175 | + if ($title) { |
|
176 | 176 | echo $title; |
177 | 177 | } else { |
178 | 178 | echo 'fail'; |
@@ -181,8 +181,8 @@ discard block |
||
181 | 181 | give_die(); |
182 | 182 | } |
183 | 183 | |
184 | -add_action( 'wp_ajax_give_get_form_title', 'give_ajax_get_form_title' ); |
|
185 | -add_action( 'wp_ajax_nopriv_give_get_form_title', 'give_ajax_get_form_title' ); |
|
184 | +add_action('wp_ajax_give_get_form_title', 'give_ajax_get_form_title'); |
|
185 | +add_action('wp_ajax_nopriv_give_get_form_title', 'give_ajax_get_form_title'); |
|
186 | 186 | |
187 | 187 | /** |
188 | 188 | * Retrieve a states drop down |
@@ -196,41 +196,41 @@ discard block |
||
196 | 196 | $show_field = true; |
197 | 197 | $states_require = true; |
198 | 198 | // Get the Country code from the $_POST. |
199 | - $country = sanitize_text_field( $_POST['country'] ); |
|
199 | + $country = sanitize_text_field($_POST['country']); |
|
200 | 200 | |
201 | 201 | // Get the field name from the $_POST. |
202 | - $field_name = sanitize_text_field( $_POST['field_name'] ); |
|
202 | + $field_name = sanitize_text_field($_POST['field_name']); |
|
203 | 203 | |
204 | - $label = __( 'State', 'give' ); |
|
204 | + $label = __('State', 'give'); |
|
205 | 205 | $states_label = give_get_states_label(); |
206 | 206 | |
207 | 207 | $default_state = ''; |
208 | - if ( $country === give_get_country() ) { |
|
208 | + if ($country === give_get_country()) { |
|
209 | 209 | $default_state = give_get_state(); |
210 | 210 | } |
211 | 211 | |
212 | 212 | // Check if $country code exists in the array key for states label. |
213 | - if ( array_key_exists( $country, $states_label ) ) { |
|
214 | - $label = $states_label[ $country ]; |
|
213 | + if (array_key_exists($country, $states_label)) { |
|
214 | + $label = $states_label[$country]; |
|
215 | 215 | } |
216 | 216 | |
217 | - if ( empty( $country ) ) { |
|
217 | + if (empty($country)) { |
|
218 | 218 | $country = give_get_country(); |
219 | 219 | } |
220 | 220 | |
221 | - $states = give_get_states( $country ); |
|
222 | - if ( ! empty( $states ) ) { |
|
221 | + $states = give_get_states($country); |
|
222 | + if ( ! empty($states)) { |
|
223 | 223 | $args = array( |
224 | 224 | 'name' => $field_name, |
225 | 225 | 'id' => $field_name, |
226 | - 'class' => $field_name . ' give-select', |
|
226 | + 'class' => $field_name.' give-select', |
|
227 | 227 | 'options' => $states, |
228 | 228 | 'show_option_all' => false, |
229 | 229 | 'show_option_none' => false, |
230 | 230 | 'placeholder' => $label, |
231 | 231 | 'selected' => $default_state, |
232 | 232 | ); |
233 | - $data = Give()->html->select( $args ); |
|
233 | + $data = Give()->html->select($args); |
|
234 | 234 | $states_found = true; |
235 | 235 | } else { |
236 | 236 | $data = 'nostates'; |
@@ -239,7 +239,7 @@ discard block |
||
239 | 239 | $no_states_country = give_no_states_country_list(); |
240 | 240 | |
241 | 241 | // Check if $country code exists in the array key. |
242 | - if ( array_key_exists( $country, $no_states_country ) ) { |
|
242 | + if (array_key_exists($country, $no_states_country)) { |
|
243 | 243 | $show_field = false; |
244 | 244 | } |
245 | 245 | |
@@ -247,7 +247,7 @@ discard block |
||
247 | 247 | $states_not_required_country_list = give_states_not_required_country_list(); |
248 | 248 | |
249 | 249 | // Check if $country code exists in the array key. |
250 | - if ( array_key_exists( $country, $states_not_required_country_list ) ) { |
|
250 | + if (array_key_exists($country, $states_not_required_country_list)) { |
|
251 | 251 | $states_require = false; |
252 | 252 | } |
253 | 253 | } |
@@ -260,10 +260,10 @@ discard block |
||
260 | 260 | 'data' => $data, |
261 | 261 | 'default_state' => $default_state, |
262 | 262 | ); |
263 | - wp_send_json( $response ); |
|
263 | + wp_send_json($response); |
|
264 | 264 | } |
265 | -add_action( 'wp_ajax_give_get_states', 'give_ajax_get_states_field' ); |
|
266 | -add_action( 'wp_ajax_nopriv_give_get_states', 'give_ajax_get_states_field' ); |
|
265 | +add_action('wp_ajax_give_get_states', 'give_ajax_get_states_field'); |
|
266 | +add_action('wp_ajax_nopriv_give_get_states', 'give_ajax_get_states_field'); |
|
267 | 267 | |
268 | 268 | /** |
269 | 269 | * Retrieve donation forms via AJAX for chosen dropdown search field. |
@@ -275,19 +275,19 @@ discard block |
||
275 | 275 | function give_ajax_form_search() { |
276 | 276 | global $wpdb; |
277 | 277 | |
278 | - $search = esc_sql( sanitize_text_field( $_GET['s'] ) ); |
|
279 | - $excludes = ( isset( $_GET['current_id'] ) ? (array) $_GET['current_id'] : array() ); |
|
278 | + $search = esc_sql(sanitize_text_field($_GET['s'])); |
|
279 | + $excludes = (isset($_GET['current_id']) ? (array) $_GET['current_id'] : array()); |
|
280 | 280 | |
281 | 281 | $results = array(); |
282 | - if ( current_user_can( 'edit_give_forms' ) ) { |
|
283 | - $items = $wpdb->get_results( "SELECT ID,post_title FROM $wpdb->posts WHERE `post_type` = 'give_forms' AND `post_title` LIKE '%$search%' LIMIT 50" ); |
|
282 | + if (current_user_can('edit_give_forms')) { |
|
283 | + $items = $wpdb->get_results("SELECT ID,post_title FROM $wpdb->posts WHERE `post_type` = 'give_forms' AND `post_title` LIKE '%$search%' LIMIT 50"); |
|
284 | 284 | } else { |
285 | - $items = $wpdb->get_results( "SELECT ID,post_title FROM $wpdb->posts WHERE `post_type` = 'give_forms' AND `post_status` = 'publish' AND `post_title` LIKE '%$search%' LIMIT 50" ); |
|
285 | + $items = $wpdb->get_results("SELECT ID,post_title FROM $wpdb->posts WHERE `post_type` = 'give_forms' AND `post_status` = 'publish' AND `post_title` LIKE '%$search%' LIMIT 50"); |
|
286 | 286 | } |
287 | 287 | |
288 | - if ( $items ) { |
|
288 | + if ($items) { |
|
289 | 289 | |
290 | - foreach ( $items as $item ) { |
|
290 | + foreach ($items as $item) { |
|
291 | 291 | |
292 | 292 | $results[] = array( |
293 | 293 | 'id' => $item->ID, |
@@ -298,18 +298,18 @@ discard block |
||
298 | 298 | |
299 | 299 | $items[] = array( |
300 | 300 | 'id' => 0, |
301 | - 'name' => __( 'No forms found.', 'give' ), |
|
301 | + 'name' => __('No forms found.', 'give'), |
|
302 | 302 | ); |
303 | 303 | |
304 | 304 | } |
305 | 305 | |
306 | - echo json_encode( $results ); |
|
306 | + echo json_encode($results); |
|
307 | 307 | |
308 | 308 | give_die(); |
309 | 309 | } |
310 | 310 | |
311 | -add_action( 'wp_ajax_give_form_search', 'give_ajax_form_search' ); |
|
312 | -add_action( 'wp_ajax_nopriv_give_form_search', 'give_ajax_form_search' ); |
|
311 | +add_action('wp_ajax_give_form_search', 'give_ajax_form_search'); |
|
312 | +add_action('wp_ajax_nopriv_give_form_search', 'give_ajax_form_search'); |
|
313 | 313 | |
314 | 314 | /** |
315 | 315 | * Search the donors database via Ajax |
@@ -321,38 +321,38 @@ discard block |
||
321 | 321 | function give_ajax_donor_search() { |
322 | 322 | global $wpdb; |
323 | 323 | |
324 | - $search = esc_sql( sanitize_text_field( $_GET['s'] ) ); |
|
324 | + $search = esc_sql(sanitize_text_field($_GET['s'])); |
|
325 | 325 | $results = array(); |
326 | - if ( ! current_user_can( 'view_give_reports' ) ) { |
|
326 | + if ( ! current_user_can('view_give_reports')) { |
|
327 | 327 | $donors = array(); |
328 | 328 | } else { |
329 | - $donors = $wpdb->get_results( "SELECT id,name,email FROM {$wpdb->prefix}give_customers WHERE `name` LIKE '%$search%' OR `email` LIKE '%$search%' LIMIT 50" ); |
|
329 | + $donors = $wpdb->get_results("SELECT id,name,email FROM {$wpdb->prefix}give_customers WHERE `name` LIKE '%$search%' OR `email` LIKE '%$search%' LIMIT 50"); |
|
330 | 330 | } |
331 | 331 | |
332 | - if ( $donors ) { |
|
332 | + if ($donors) { |
|
333 | 333 | |
334 | - foreach ( $donors as $donor ) { |
|
334 | + foreach ($donors as $donor) { |
|
335 | 335 | |
336 | 336 | $results[] = array( |
337 | 337 | 'id' => $donor->id, |
338 | - 'name' => $donor->name . ' (' . $donor->email . ')', |
|
338 | + 'name' => $donor->name.' ('.$donor->email.')', |
|
339 | 339 | ); |
340 | 340 | } |
341 | 341 | } else { |
342 | 342 | |
343 | 343 | $donors[] = array( |
344 | 344 | 'id' => 0, |
345 | - 'name' => __( 'No donors found.', 'give' ), |
|
345 | + 'name' => __('No donors found.', 'give'), |
|
346 | 346 | ); |
347 | 347 | |
348 | 348 | } |
349 | 349 | |
350 | - echo json_encode( $results ); |
|
350 | + echo json_encode($results); |
|
351 | 351 | |
352 | 352 | give_die(); |
353 | 353 | } |
354 | 354 | |
355 | -add_action( 'wp_ajax_give_donor_search', 'give_ajax_donor_search' ); |
|
355 | +add_action('wp_ajax_give_donor_search', 'give_ajax_donor_search'); |
|
356 | 356 | |
357 | 357 | |
358 | 358 | /** |
@@ -364,39 +364,39 @@ discard block |
||
364 | 364 | */ |
365 | 365 | function give_ajax_search_users() { |
366 | 366 | |
367 | - if ( current_user_can( 'manage_give_settings' ) ) { |
|
367 | + if (current_user_can('manage_give_settings')) { |
|
368 | 368 | |
369 | - $search = esc_sql( sanitize_text_field( $_GET['s'] ) ); |
|
369 | + $search = esc_sql(sanitize_text_field($_GET['s'])); |
|
370 | 370 | |
371 | 371 | $get_users_args = array( |
372 | 372 | 'number' => 9999, |
373 | - 'search' => $search . '*', |
|
373 | + 'search' => $search.'*', |
|
374 | 374 | ); |
375 | 375 | |
376 | - $get_users_args = apply_filters( 'give_search_users_args', $get_users_args ); |
|
376 | + $get_users_args = apply_filters('give_search_users_args', $get_users_args); |
|
377 | 377 | |
378 | - $found_users = apply_filters( 'give_ajax_found_users', get_users( $get_users_args ), $search ); |
|
378 | + $found_users = apply_filters('give_ajax_found_users', get_users($get_users_args), $search); |
|
379 | 379 | $results = array(); |
380 | 380 | |
381 | - if ( $found_users ) { |
|
381 | + if ($found_users) { |
|
382 | 382 | |
383 | - foreach ( $found_users as $user ) { |
|
383 | + foreach ($found_users as $user) { |
|
384 | 384 | |
385 | 385 | $results[] = array( |
386 | 386 | 'id' => $user->ID, |
387 | - 'name' => esc_html( $user->user_login . ' (' . $user->user_email . ')' ), |
|
387 | + 'name' => esc_html($user->user_login.' ('.$user->user_email.')'), |
|
388 | 388 | ); |
389 | 389 | } |
390 | 390 | } else { |
391 | 391 | |
392 | 392 | $results[] = array( |
393 | 393 | 'id' => 0, |
394 | - 'name' => __( 'No users found.', 'give' ), |
|
394 | + 'name' => __('No users found.', 'give'), |
|
395 | 395 | ); |
396 | 396 | |
397 | 397 | } |
398 | 398 | |
399 | - echo json_encode( $results ); |
|
399 | + echo json_encode($results); |
|
400 | 400 | |
401 | 401 | }// End if(). |
402 | 402 | |
@@ -404,7 +404,7 @@ discard block |
||
404 | 404 | |
405 | 405 | } |
406 | 406 | |
407 | -add_action( 'wp_ajax_give_user_search', 'give_ajax_search_users' ); |
|
407 | +add_action('wp_ajax_give_user_search', 'give_ajax_search_users'); |
|
408 | 408 | |
409 | 409 | |
410 | 410 | /** |
@@ -416,32 +416,32 @@ discard block |
||
416 | 416 | */ |
417 | 417 | function give_check_for_form_price_variations() { |
418 | 418 | |
419 | - if ( ! current_user_can( 'edit_give_forms', get_current_user_id() ) ) { |
|
420 | - die( '-1' ); |
|
419 | + if ( ! current_user_can('edit_give_forms', get_current_user_id())) { |
|
420 | + die('-1'); |
|
421 | 421 | } |
422 | 422 | |
423 | - $form_id = intval( $_POST['form_id'] ); |
|
424 | - $form = get_post( $form_id ); |
|
423 | + $form_id = intval($_POST['form_id']); |
|
424 | + $form = get_post($form_id); |
|
425 | 425 | |
426 | - if ( 'give_forms' != $form->post_type ) { |
|
427 | - die( '-2' ); |
|
426 | + if ('give_forms' != $form->post_type) { |
|
427 | + die('-2'); |
|
428 | 428 | } |
429 | 429 | |
430 | - if ( give_has_variable_prices( $form_id ) ) { |
|
431 | - $variable_prices = give_get_variable_prices( $form_id ); |
|
430 | + if (give_has_variable_prices($form_id)) { |
|
431 | + $variable_prices = give_get_variable_prices($form_id); |
|
432 | 432 | |
433 | - if ( $variable_prices ) { |
|
433 | + if ($variable_prices) { |
|
434 | 434 | $ajax_response = '<select class="give_price_options_select give-select give-select" name="give_price_option">'; |
435 | 435 | |
436 | - if ( isset( $_POST['all_prices'] ) ) { |
|
437 | - $ajax_response .= '<option value="all">' . esc_html__( 'All Levels', 'give' ) . '</option>'; |
|
436 | + if (isset($_POST['all_prices'])) { |
|
437 | + $ajax_response .= '<option value="all">'.esc_html__('All Levels', 'give').'</option>'; |
|
438 | 438 | } |
439 | 439 | |
440 | - foreach ( $variable_prices as $key => $price ) { |
|
440 | + foreach ($variable_prices as $key => $price) { |
|
441 | 441 | |
442 | - $level_text = ! empty( $price['_give_text'] ) ? esc_html( $price['_give_text'] ) : give_currency_filter( give_format_amount( $price['_give_amount'], array( 'sanitize' => false ) ) ); |
|
442 | + $level_text = ! empty($price['_give_text']) ? esc_html($price['_give_text']) : give_currency_filter(give_format_amount($price['_give_amount'], array('sanitize' => false))); |
|
443 | 443 | |
444 | - $ajax_response .= '<option value="' . esc_attr( $price['_give_id']['level_id'] ) . '">' . $level_text . '</option>'; |
|
444 | + $ajax_response .= '<option value="'.esc_attr($price['_give_id']['level_id']).'">'.$level_text.'</option>'; |
|
445 | 445 | } |
446 | 446 | $ajax_response .= '</select>'; |
447 | 447 | echo $ajax_response; |
@@ -451,7 +451,7 @@ discard block |
||
451 | 451 | give_die(); |
452 | 452 | } |
453 | 453 | |
454 | -add_action( 'wp_ajax_give_check_for_form_price_variations', 'give_check_for_form_price_variations' ); |
|
454 | +add_action('wp_ajax_give_check_for_form_price_variations', 'give_check_for_form_price_variations'); |
|
455 | 455 | |
456 | 456 | |
457 | 457 | /** |
@@ -462,25 +462,25 @@ discard block |
||
462 | 462 | * @return void |
463 | 463 | */ |
464 | 464 | function give_check_for_form_price_variations_html() { |
465 | - if ( ! current_user_can( 'edit_give_payments', get_current_user_id() ) ) { |
|
465 | + if ( ! current_user_can('edit_give_payments', get_current_user_id())) { |
|
466 | 466 | wp_die(); |
467 | 467 | } |
468 | 468 | |
469 | - $form_id = ! empty( $_POST['form_id'] ) ? intval( $_POST['form_id'] ) : 0; |
|
470 | - $payment_id = ! empty( $_POST['payment_id'] ) ? intval( $_POST['payment_id'] ) : 0; |
|
471 | - $form = get_post( $form_id ); |
|
469 | + $form_id = ! empty($_POST['form_id']) ? intval($_POST['form_id']) : 0; |
|
470 | + $payment_id = ! empty($_POST['payment_id']) ? intval($_POST['payment_id']) : 0; |
|
471 | + $form = get_post($form_id); |
|
472 | 472 | |
473 | - if ( 'give_forms' != $form->post_type ) { |
|
473 | + if ('give_forms' != $form->post_type) { |
|
474 | 474 | wp_die(); |
475 | 475 | } |
476 | 476 | |
477 | - if ( ! give_has_variable_prices( $form_id ) || ! $form_id ) { |
|
478 | - esc_html_e( 'n/a', 'give' ); |
|
477 | + if ( ! give_has_variable_prices($form_id) || ! $form_id) { |
|
478 | + esc_html_e('n/a', 'give'); |
|
479 | 479 | } else { |
480 | 480 | $prices_atts = ''; |
481 | - if ( $variable_prices = give_get_variable_prices( $form_id ) ) { |
|
482 | - foreach ( $variable_prices as $variable_price ) { |
|
483 | - $prices_atts[ $variable_price['_give_id']['level_id'] ] = give_format_amount( $variable_price['_give_amount'], array( 'sanitize' => false ) ); |
|
481 | + if ($variable_prices = give_get_variable_prices($form_id)) { |
|
482 | + foreach ($variable_prices as $variable_price) { |
|
483 | + $prices_atts[$variable_price['_give_id']['level_id']] = give_format_amount($variable_price['_give_amount'], array('sanitize' => false)); |
|
484 | 484 | } |
485 | 485 | } |
486 | 486 | |
@@ -491,12 +491,12 @@ discard block |
||
491 | 491 | 'chosen' => true, |
492 | 492 | 'show_option_all' => '', |
493 | 493 | 'show_option_none' => '', |
494 | - 'select_atts' => 'data-prices=' . esc_attr( json_encode( $prices_atts ) ), |
|
494 | + 'select_atts' => 'data-prices='.esc_attr(json_encode($prices_atts)), |
|
495 | 495 | ); |
496 | 496 | |
497 | - if ( $payment_id ) { |
|
497 | + if ($payment_id) { |
|
498 | 498 | // Payment object. |
499 | - $payment = new Give_Payment( $payment_id ); |
|
499 | + $payment = new Give_Payment($payment_id); |
|
500 | 500 | |
501 | 501 | // Payment meta. |
502 | 502 | $payment_meta = $payment->get_meta(); |
@@ -504,10 +504,10 @@ discard block |
||
504 | 504 | } |
505 | 505 | |
506 | 506 | // Render variable prices select tag html. |
507 | - give_get_form_variable_price_dropdown( $variable_price_dropdown_option, true ); |
|
507 | + give_get_form_variable_price_dropdown($variable_price_dropdown_option, true); |
|
508 | 508 | } |
509 | 509 | |
510 | 510 | give_die(); |
511 | 511 | } |
512 | 512 | |
513 | -add_action( 'wp_ajax_give_check_for_form_price_variations_html', 'give_check_for_form_price_variations_html' ); |
|
513 | +add_action('wp_ajax_give_check_for_form_price_variations_html', 'give_check_for_form_price_variations_html'); |
@@ -64,7 +64,7 @@ |
||
64 | 64 | * |
65 | 65 | * @param string $value |
66 | 66 | * |
67 | - * @return mixed |
|
67 | + * @return string |
|
68 | 68 | */ |
69 | 69 | function __give_validate_decimal_separator_setting_field( $value ) { |
70 | 70 | $thousand_separator = give_clean( $_POST['thousands_separator'] ); |
@@ -10,7 +10,7 @@ discard block |
||
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 | |
@@ -27,30 +27,30 @@ discard block |
||
27 | 27 | * |
28 | 28 | * @return mixed |
29 | 29 | */ |
30 | -function __give_sanitize_number_decimals_setting_field( $value ) { |
|
30 | +function __give_sanitize_number_decimals_setting_field($value) { |
|
31 | 31 | $value_changed = false; |
32 | 32 | $old_value = $value; |
33 | 33 | |
34 | - if ( isset( $_POST['decimal_separator'] ) ) { |
|
35 | - $value = ! empty( $_POST['decimal_separator'] ) ? $value : 0; |
|
34 | + if (isset($_POST['decimal_separator'])) { |
|
35 | + $value = ! empty($_POST['decimal_separator']) ? $value : 0; |
|
36 | 36 | $value_changed = true; |
37 | 37 | } |
38 | 38 | |
39 | - if ( $value_changed && ( $old_value != $value ) ) { |
|
40 | - Give_Admin_Settings::add_error( 'give-number-decimal', __( 'The \'Number of Decimals\' option has been automatically set to zero because the \'Decimal Separator\' is not set.', 'give' ) ); |
|
39 | + if ($value_changed && ($old_value != $value)) { |
|
40 | + Give_Admin_Settings::add_error('give-number-decimal', __('The \'Number of Decimals\' option has been automatically set to zero because the \'Decimal Separator\' is not set.', 'give')); |
|
41 | 41 | } |
42 | 42 | |
43 | - $value = absint( $value ); |
|
43 | + $value = absint($value); |
|
44 | 44 | |
45 | - if( 6 <= $value ) { |
|
45 | + if (6 <= $value) { |
|
46 | 46 | $value = 5; |
47 | - Give_Admin_Settings::add_error( 'give-number-decimal', __( 'The \'Number of Decimals\' option has been automatically set to 5 because you entered a number higher than the maximum allowed.', 'give' ) ); |
|
47 | + Give_Admin_Settings::add_error('give-number-decimal', __('The \'Number of Decimals\' option has been automatically set to 5 because you entered a number higher than the maximum allowed.', 'give')); |
|
48 | 48 | } |
49 | 49 | |
50 | - return absint( $value ); |
|
50 | + return absint($value); |
|
51 | 51 | } |
52 | 52 | |
53 | -add_filter( 'give_admin_settings_sanitize_option_number_decimals', '__give_sanitize_number_decimals_setting_field', 10 ); |
|
53 | +add_filter('give_admin_settings_sanitize_option_number_decimals', '__give_sanitize_number_decimals_setting_field', 10); |
|
54 | 54 | |
55 | 55 | |
56 | 56 | /** |
@@ -66,20 +66,20 @@ discard block |
||
66 | 66 | * |
67 | 67 | * @return mixed |
68 | 68 | */ |
69 | -function __give_validate_decimal_separator_setting_field( $value ) { |
|
70 | - $thousand_separator = give_clean( $_POST['thousands_separator'] ); |
|
71 | - $decimal_separator = give_clean( $_POST['decimal_separator'] ); |
|
69 | +function __give_validate_decimal_separator_setting_field($value) { |
|
70 | + $thousand_separator = give_clean($_POST['thousands_separator']); |
|
71 | + $decimal_separator = give_clean($_POST['decimal_separator']); |
|
72 | 72 | |
73 | - if ( $decimal_separator === $thousand_separator ) { |
|
73 | + if ($decimal_separator === $thousand_separator) { |
|
74 | 74 | $value = ''; |
75 | 75 | $_POST['number_decimals'] = 0; |
76 | - Give_Admin_Settings::add_error( 'give-decimal-separator', __( 'The \'Decimal Separator\' option has automatically been set to empty because it can not be equal to the \'Thousand Separator\'', 'give' ) ); |
|
76 | + Give_Admin_Settings::add_error('give-decimal-separator', __('The \'Decimal Separator\' option has automatically been set to empty because it can not be equal to the \'Thousand Separator\'', 'give')); |
|
77 | 77 | } |
78 | 78 | |
79 | 79 | return $value; |
80 | 80 | } |
81 | 81 | |
82 | -add_filter( 'give_admin_settings_sanitize_option_decimal_separator', '__give_validate_decimal_separator_setting_field', 10 ); |
|
82 | +add_filter('give_admin_settings_sanitize_option_decimal_separator', '__give_validate_decimal_separator_setting_field', 10); |
|
83 | 83 | |
84 | 84 | /** |
85 | 85 | * Change $delimiter text to symbol. |
@@ -90,13 +90,13 @@ discard block |
||
90 | 90 | * |
91 | 91 | * @return string $delimiter. |
92 | 92 | */ |
93 | -function __give_import_delimiter_set_callback( $delimiter ) { |
|
93 | +function __give_import_delimiter_set_callback($delimiter) { |
|
94 | 94 | $delimite_type = array( |
95 | 95 | 'csv' => ",", |
96 | 96 | 'tab-separated-values' => "\t", |
97 | 97 | ); |
98 | 98 | |
99 | - return ( array_key_exists( $delimiter, $delimite_type ) ? $delimite_type[ $delimiter ] : "," ); |
|
99 | + return (array_key_exists($delimiter, $delimite_type) ? $delimite_type[$delimiter] : ","); |
|
100 | 100 | } |
101 | 101 | |
102 | -add_filter( 'give_import_delimiter_set', '__give_import_delimiter_set_callback', 10 ); |
|
103 | 102 | \ No newline at end of file |
103 | +add_filter('give_import_delimiter_set', '__give_import_delimiter_set_callback', 10); |
|
104 | 104 | \ No newline at end of file |
@@ -454,7 +454,7 @@ discard block |
||
454 | 454 | |
455 | 455 | /** |
456 | 456 | * @param $option_value |
457 | - * @param $value |
|
457 | + * @param boolean $value |
|
458 | 458 | * |
459 | 459 | * @return string |
460 | 460 | */ |
@@ -544,7 +544,7 @@ discard block |
||
544 | 544 | * |
545 | 545 | * @since 1.8.14 |
546 | 546 | * |
547 | - * @param $file_id |
|
547 | + * @param integer $file_id |
|
548 | 548 | * |
549 | 549 | * @return bool|int |
550 | 550 | */ |
@@ -871,8 +871,8 @@ |
||
871 | 871 | */ |
872 | 872 | private function is_donations_import_page() { |
873 | 873 | return 'import' === give_get_current_setting_tab() && |
874 | - isset( $_GET['importer-type'] ) && |
|
875 | - $this->importer_type === give_clean( $_GET['importer-type'] ); |
|
874 | + isset( $_GET['importer-type'] ) && |
|
875 | + $this->importer_type === give_clean( $_GET['importer-type'] ); |
|
876 | 876 | } |
877 | 877 | } |
878 | 878 |
@@ -11,11 +11,11 @@ discard block |
||
11 | 11 | * @since 1.8.14 |
12 | 12 | */ |
13 | 13 | |
14 | -if ( ! defined( 'ABSPATH' ) ) { |
|
14 | +if ( ! defined('ABSPATH')) { |
|
15 | 15 | exit; // Exit if accessed directly |
16 | 16 | } |
17 | 17 | |
18 | -if ( ! class_exists( 'Give_Import_Donations' ) ) { |
|
18 | +if ( ! class_exists('Give_Import_Donations')) { |
|
19 | 19 | |
20 | 20 | /** |
21 | 21 | * Give_Import_Donations. |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | * @return static |
70 | 70 | */ |
71 | 71 | public static function get_instance() { |
72 | - if ( null === static::$instance ) { |
|
72 | + if (null === static::$instance) { |
|
73 | 73 | self::$instance = new static(); |
74 | 74 | } |
75 | 75 | |
@@ -96,27 +96,27 @@ discard block |
||
96 | 96 | * @return void |
97 | 97 | */ |
98 | 98 | private function setup_hooks() { |
99 | - if ( ! $this->is_donations_import_page() ) { |
|
99 | + if ( ! $this->is_donations_import_page()) { |
|
100 | 100 | return; |
101 | 101 | } |
102 | 102 | |
103 | 103 | // Do not render main import tools page. |
104 | - remove_action( 'give_admin_field_tools_import', array( 'Give_Settings_Import', 'render_import_field', ) ); |
|
104 | + remove_action('give_admin_field_tools_import', array('Give_Settings_Import', 'render_import_field',)); |
|
105 | 105 | |
106 | 106 | |
107 | 107 | // Render donation import page |
108 | - add_action( 'give_admin_field_tools_import', array( $this, 'render_page' ) ); |
|
108 | + add_action('give_admin_field_tools_import', array($this, 'render_page')); |
|
109 | 109 | |
110 | 110 | // Print the HTML. |
111 | - add_action( 'give_tools_import_donations_form_start', array( $this, 'html' ), 10 ); |
|
111 | + add_action('give_tools_import_donations_form_start', array($this, 'html'), 10); |
|
112 | 112 | |
113 | 113 | // Run when form submit. |
114 | - add_action( 'give-tools_save_import', array( $this, 'save' ) ); |
|
114 | + add_action('give-tools_save_import', array($this, 'save')); |
|
115 | 115 | |
116 | - add_action( 'give-tools_update_notices', array( $this, 'update_notices' ), 11, 1 ); |
|
116 | + add_action('give-tools_update_notices', array($this, 'update_notices'), 11, 1); |
|
117 | 117 | |
118 | 118 | // Used to add submit button. |
119 | - add_action( 'give_tools_import_donations_form_end', array( $this, 'submit' ), 10 ); |
|
119 | + add_action('give_tools_import_donations_form_end', array($this, 'submit'), 10); |
|
120 | 120 | } |
121 | 121 | |
122 | 122 | /** |
@@ -128,9 +128,9 @@ discard block |
||
128 | 128 | * |
129 | 129 | * @return mixed |
130 | 130 | */ |
131 | - public function update_notices( $messages ) { |
|
132 | - if ( ! empty( $_GET['tab'] ) && 'import' === give_clean( $_GET['tab'] ) ) { |
|
133 | - unset( $messages['give-setting-updated'] ); |
|
131 | + public function update_notices($messages) { |
|
132 | + if ( ! empty($_GET['tab']) && 'import' === give_clean($_GET['tab'])) { |
|
133 | + unset($messages['give-setting-updated']); |
|
134 | 134 | } |
135 | 135 | |
136 | 136 | return $messages; |
@@ -142,7 +142,7 @@ discard block |
||
142 | 142 | * @since 1.8.14 |
143 | 143 | */ |
144 | 144 | public function submit() { |
145 | - wp_nonce_field( 'give-save-settings', '_give-save-settings' ); |
|
145 | + wp_nonce_field('give-save-settings', '_give-save-settings'); |
|
146 | 146 | ?> |
147 | 147 | <input type="hidden" class="import-step" id="import-step" name="step" value="<?php echo $this->get_step(); ?>"/> |
148 | 148 | <input type="hidden" class="importer-type" value="<?php echo $this->importer_type; ?>"/> |
@@ -164,7 +164,7 @@ discard block |
||
164 | 164 | <table class="widefat export-options-table give-table <?php echo "step-{$step}"; ?>" id="<?php echo "step-{$step}"; ?>"> |
165 | 165 | <tbody> |
166 | 166 | <?php |
167 | - switch ( $this->get_step() ) { |
|
167 | + switch ($this->get_step()) { |
|
168 | 168 | case 1: |
169 | 169 | $this->render_media_csv(); |
170 | 170 | break; |
@@ -181,7 +181,7 @@ discard block |
||
181 | 181 | $this->import_success(); |
182 | 182 | } |
183 | 183 | |
184 | - if ( false === $this->check_for_dropdown_or_import() ) { |
|
184 | + if (false === $this->check_for_dropdown_or_import()) { |
|
185 | 185 | ?> |
186 | 186 | <tr valign="top"> |
187 | 187 | <th></th> |
@@ -189,7 +189,7 @@ discard block |
||
189 | 189 | <input type="submit" |
190 | 190 | class="button button-primary button-large button-secondary <?php echo "step-{$step}"; ?>" |
191 | 191 | id="recount-stats-submit" |
192 | - value="<?php esc_attr_e( 'Submit', 'give' ); ?>"/> |
|
192 | + value="<?php esc_attr_e('Submit', 'give'); ?>"/> |
|
193 | 193 | </th> |
194 | 194 | </tr> |
195 | 195 | <?php |
@@ -208,56 +208,56 @@ discard block |
||
208 | 208 | */ |
209 | 209 | public function import_success() { |
210 | 210 | |
211 | - $delete_csv = ( ! empty( $_GET['delete_csv'] ) ? absint( $_GET['delete_csv'] ) : false ); |
|
212 | - $csv = ( ! empty( $_GET['csv'] ) ? absint( $_GET['csv'] ) : false ); |
|
213 | - if ( ! empty( $delete_csv ) && ! empty( $csv ) ) { |
|
214 | - wp_delete_attachment( $csv, true ); |
|
211 | + $delete_csv = ( ! empty($_GET['delete_csv']) ? absint($_GET['delete_csv']) : false); |
|
212 | + $csv = ( ! empty($_GET['csv']) ? absint($_GET['csv']) : false); |
|
213 | + if ( ! empty($delete_csv) && ! empty($csv)) { |
|
214 | + wp_delete_attachment($csv, true); |
|
215 | 215 | } |
216 | 216 | |
217 | 217 | $report = give_import_donation_report(); |
218 | 218 | $report_html = array( |
219 | 219 | 'duplicate_donor' => array( |
220 | - __( '%s duplicate %s detected', 'give' ), |
|
221 | - __( 'donor', 'give' ), |
|
222 | - __( 'donors', 'give' ), |
|
220 | + __('%s duplicate %s detected', 'give'), |
|
221 | + __('donor', 'give'), |
|
222 | + __('donors', 'give'), |
|
223 | 223 | ), |
224 | 224 | 'create_donor' => array( |
225 | - __( '%s %s created', 'give' ), |
|
226 | - __( 'donor', 'give' ), |
|
227 | - __( 'donors', 'give' ), |
|
225 | + __('%s %s created', 'give'), |
|
226 | + __('donor', 'give'), |
|
227 | + __('donors', 'give'), |
|
228 | 228 | ), |
229 | 229 | 'create_form' => array( |
230 | - __( '%s donation %s created', 'give' ), |
|
231 | - __( 'form', 'give' ), |
|
232 | - __( 'forms', 'give' ), |
|
230 | + __('%s donation %s created', 'give'), |
|
231 | + __('form', 'give'), |
|
232 | + __('forms', 'give'), |
|
233 | 233 | ), |
234 | 234 | 'duplicate_donation' => array( |
235 | - __( '%s duplicate %s detected', 'give' ), |
|
236 | - __( 'donation', 'give' ), |
|
237 | - __( 'donations', 'give' ), |
|
235 | + __('%s duplicate %s detected', 'give'), |
|
236 | + __('donation', 'give'), |
|
237 | + __('donations', 'give'), |
|
238 | 238 | ), |
239 | 239 | 'create_donation' => array( |
240 | - __( '%s %s imported', 'give' ), |
|
241 | - __( 'donation', 'give' ), |
|
242 | - __( 'donations', 'give' ), |
|
240 | + __('%s %s imported', 'give'), |
|
241 | + __('donation', 'give'), |
|
242 | + __('donations', 'give'), |
|
243 | 243 | ), |
244 | 244 | ); |
245 | - $total = (int) $_GET['total']; |
|
246 | - -- $total; |
|
245 | + $total = (int) $_GET['total']; |
|
246 | + --$total; |
|
247 | 247 | $success = (bool) $_GET['success']; |
248 | 248 | ?> |
249 | 249 | <tr valign="top" class="give-import-dropdown"> |
250 | 250 | <th colspan="2"> |
251 | 251 | <h2> |
252 | 252 | <?php |
253 | - if ( $success ) { |
|
253 | + if ($success) { |
|
254 | 254 | echo sprintf( |
255 | - __( 'Import complete! %s donations processed', 'give' ), |
|
255 | + __('Import complete! %s donations processed', 'give'), |
|
256 | 256 | "<strong>{$total}</strong>" |
257 | 257 | ); |
258 | 258 | } else { |
259 | 259 | echo sprintf( |
260 | - __( 'Failed to import %s donations', 'give' ), |
|
260 | + __('Failed to import %s donations', 'give'), |
|
261 | 261 | "<strong>{$total}</strong>" |
262 | 262 | ); |
263 | 263 | } |
@@ -265,25 +265,25 @@ discard block |
||
265 | 265 | </h2> |
266 | 266 | |
267 | 267 | <?php |
268 | - $text = __( 'Import Donation', 'give' ); |
|
268 | + $text = __('Import Donation', 'give'); |
|
269 | 269 | $query_arg = array( |
270 | 270 | 'post_type' => 'give_forms', |
271 | 271 | 'page' => 'give-tools', |
272 | 272 | 'tab' => 'import', |
273 | 273 | ); |
274 | - if ( $success ) { |
|
274 | + if ($success) { |
|
275 | 275 | $query_arg = array( |
276 | 276 | 'post_type' => 'give_forms', |
277 | 277 | 'page' => 'give-payment-history', |
278 | 278 | ); |
279 | - $text = __( 'View Donations', 'give' ); |
|
279 | + $text = __('View Donations', 'give'); |
|
280 | 280 | } |
281 | 281 | |
282 | - foreach ( $report as $key => $value ) { |
|
283 | - if ( array_key_exists( $key, $report_html ) && ! empty( $value ) ) { |
|
282 | + foreach ($report as $key => $value) { |
|
283 | + if (array_key_exists($key, $report_html) && ! empty($value)) { |
|
284 | 284 | ?> |
285 | 285 | <p> |
286 | - <?php echo esc_html( wp_sprintf( $report_html[ $key ][0], $value, _n( $report_html[ $key ][1], $report_html[ $key ][2], $value, 'give' ) ) ); ?> |
|
286 | + <?php echo esc_html(wp_sprintf($report_html[$key][0], $value, _n($report_html[$key][1], $report_html[$key][2], $value, 'give'))); ?> |
|
287 | 287 | </p> |
288 | 288 | <?php |
289 | 289 | } |
@@ -291,7 +291,7 @@ discard block |
||
291 | 291 | ?> |
292 | 292 | |
293 | 293 | <p> |
294 | - <a class="button button-large button-secondary" href="<?php echo add_query_arg( $query_arg, admin_url( 'edit.php' ) ); ?>"><?php echo $text; ?></a> |
|
294 | + <a class="button button-large button-secondary" href="<?php echo add_query_arg($query_arg, admin_url('edit.php')); ?>"><?php echo $text; ?></a> |
|
295 | 295 | </p> |
296 | 296 | </th> |
297 | 297 | </tr> |
@@ -308,26 +308,26 @@ discard block |
||
308 | 308 | give_import_donation_report_reset(); |
309 | 309 | |
310 | 310 | $csv = (int) $_REQUEST['csv']; |
311 | - $delimiter = ( ! empty( $_REQUEST['delimiter'] ) ? give_clean( $_REQUEST['delimiter'] ) : 'csv' ); |
|
311 | + $delimiter = ( ! empty($_REQUEST['delimiter']) ? give_clean($_REQUEST['delimiter']) : 'csv'); |
|
312 | 312 | $index_start = 1; |
313 | 313 | $index_end = 1; |
314 | 314 | $next = true; |
315 | - $total = self::get_csv_total( $csv ); |
|
316 | - if ( self::$per_page < $total ) { |
|
317 | - $total_ajax = ceil( $total / self::$per_page ); |
|
315 | + $total = self::get_csv_total($csv); |
|
316 | + if (self::$per_page < $total) { |
|
317 | + $total_ajax = ceil($total / self::$per_page); |
|
318 | 318 | $index_end = self::$per_page; |
319 | 319 | } else { |
320 | 320 | $total_ajax = 1; |
321 | 321 | $index_end = $total; |
322 | 322 | $next = false; |
323 | 323 | } |
324 | - $current_percentage = 100 / ( $total_ajax + 1 ); |
|
324 | + $current_percentage = 100 / ($total_ajax + 1); |
|
325 | 325 | |
326 | 326 | ?> |
327 | 327 | <tr valign="top" class="give-import-dropdown"> |
328 | 328 | <th colspan="2"> |
329 | - <h2 id="give-import-title"><?php esc_html_e( 'Importing', 'give' ) ?></h2> |
|
330 | - <p class="give-field-description"><?php esc_html_e( 'Your donations are now being imported...', 'give' ) ?></p> |
|
329 | + <h2 id="give-import-title"><?php esc_html_e('Importing', 'give') ?></h2> |
|
330 | + <p class="give-field-description"><?php esc_html_e('Your donations are now being imported...', 'give') ?></p> |
|
331 | 331 | </th> |
332 | 332 | </tr> |
333 | 333 | |
@@ -346,7 +346,7 @@ discard block |
||
346 | 346 | <div style="width: <?php echo $current_percentage; ?>%"></div> |
347 | 347 | </div> |
348 | 348 | <input type="hidden" value="3" name="step"> |
349 | - <input type="hidden" value='<?php echo maybe_serialize( $_REQUEST['mapto'] ); ?>' name="mapto" |
|
349 | + <input type="hidden" value='<?php echo maybe_serialize($_REQUEST['mapto']); ?>' name="mapto" |
|
350 | 350 | class="mapto"> |
351 | 351 | <input type="hidden" value="<?php echo $_REQUEST['csv']; ?>" name="csv" class="csv"> |
352 | 352 | <input type="hidden" value="<?php echo $_REQUEST['mode']; ?>" name="mode" class="mode"> |
@@ -355,7 +355,7 @@ discard block |
||
355 | 355 | <input type="hidden" value="<?php echo $_REQUEST['delete_csv']; ?>" name="delete_csv" |
356 | 356 | class="delete_csv"> |
357 | 357 | <input type="hidden" value="<?php echo $delimiter; ?>" name="delimiter"> |
358 | - <input type="hidden" value='<?php echo maybe_serialize( self::get_importer( $csv, 0, $delimiter ) ); ?>' |
|
358 | + <input type="hidden" value='<?php echo maybe_serialize(self::get_importer($csv, 0, $delimiter)); ?>' |
|
359 | 359 | name="main_key" |
360 | 360 | class="main_key"> |
361 | 361 | </th> |
@@ -376,20 +376,20 @@ discard block |
||
376 | 376 | */ |
377 | 377 | public function check_for_dropdown_or_import() { |
378 | 378 | $return = true; |
379 | - if ( isset( $_REQUEST['mapto'] ) ) { |
|
379 | + if (isset($_REQUEST['mapto'])) { |
|
380 | 380 | $mapto = (array) $_REQUEST['mapto']; |
381 | - if ( false === in_array( 'form_title', $mapto ) && false === in_array( 'form_id', $mapto ) ) { |
|
382 | - Give_Admin_Settings::add_error( 'give-import-csv-form', __( 'Please select Form ID or Form Name options from the dropdown.', 'give' ) ); |
|
381 | + if (false === in_array('form_title', $mapto) && false === in_array('form_id', $mapto)) { |
|
382 | + Give_Admin_Settings::add_error('give-import-csv-form', __('Please select Form ID or Form Name options from the dropdown.', 'give')); |
|
383 | 383 | $return = false; |
384 | 384 | } |
385 | 385 | |
386 | - if ( false === in_array( 'amount', $mapto ) ) { |
|
387 | - Give_Admin_Settings::add_error( 'give-import-csv-amount', __( 'Please select Amount option from the dropdown.', 'give' ) ); |
|
386 | + if (false === in_array('amount', $mapto)) { |
|
387 | + Give_Admin_Settings::add_error('give-import-csv-amount', __('Please select Amount option from the dropdown.', 'give')); |
|
388 | 388 | $return = false; |
389 | 389 | } |
390 | 390 | |
391 | - if ( false === in_array( 'email', $mapto ) && false === in_array( 'donor_id', $mapto ) ) { |
|
392 | - Give_Admin_Settings::add_error( 'give-import-csv-donor', __( 'Please select Email id or Customer ID options from the dropdown.', 'give' ) ); |
|
391 | + if (false === in_array('email', $mapto) && false === in_array('donor_id', $mapto)) { |
|
392 | + Give_Admin_Settings::add_error('give-import-csv-donor', __('Please select Email id or Customer ID options from the dropdown.', 'give')); |
|
393 | 393 | $return = false; |
394 | 394 | } |
395 | 395 | } else { |
@@ -406,10 +406,10 @@ discard block |
||
406 | 406 | */ |
407 | 407 | public function render_dropdown() { |
408 | 408 | $csv = (int) $_GET['csv']; |
409 | - $delimiter = ( ! empty( $_GET['delimiter'] ) ? give_clean( $_GET['delimiter'] ) : 'csv' ); |
|
409 | + $delimiter = ( ! empty($_GET['delimiter']) ? give_clean($_GET['delimiter']) : 'csv'); |
|
410 | 410 | |
411 | 411 | // TO check if the CSV files that is being add is valid or not if not then redirect to first step again |
412 | - if ( ! $this->is_valid_csv( $csv ) ) { |
|
412 | + if ( ! $this->is_valid_csv($csv)) { |
|
413 | 413 | $url = give_import_page_url(); |
414 | 414 | ?> |
415 | 415 | <script type="text/javascript"> |
@@ -420,30 +420,30 @@ discard block |
||
420 | 420 | ?> |
421 | 421 | <tr valign="top" class="give-import-dropdown"> |
422 | 422 | <th colspan="2"> |
423 | - <h2 id="give-import-title"><?php esc_html_e( 'Map CSV fields to donations', 'give' ) ?></h2> |
|
424 | - <p class="give-field-description"><?php esc_html_e( 'Select fields from your CSV file to map against donations fields or to ignore during import.', 'give' ) ?></p> |
|
423 | + <h2 id="give-import-title"><?php esc_html_e('Map CSV fields to donations', 'give') ?></h2> |
|
424 | + <p class="give-field-description"><?php esc_html_e('Select fields from your CSV file to map against donations fields or to ignore during import.', 'give') ?></p> |
|
425 | 425 | </th> |
426 | 426 | </tr> |
427 | 427 | |
428 | 428 | <tr valign="top" class="give-import-dropdown"> |
429 | - <th><b><?php esc_html_e( 'Column name', 'give' ); ?></b></th> |
|
430 | - <th><b><?php esc_html_e( 'Map to field', 'give' ); ?></b></th> |
|
429 | + <th><b><?php esc_html_e('Column name', 'give'); ?></b></th> |
|
430 | + <th><b><?php esc_html_e('Map to field', 'give'); ?></b></th> |
|
431 | 431 | </tr> |
432 | 432 | |
433 | 433 | <?php |
434 | - $raw_key = $this->get_importer( $csv, 0, $delimiter ); |
|
434 | + $raw_key = $this->get_importer($csv, 0, $delimiter); |
|
435 | 435 | $donations = give_import_donations_options(); |
436 | 436 | $donors = give_import_donor_options(); |
437 | 437 | $forms = give_import_donation_form_options(); |
438 | - $mapto = (array) ( isset( $_REQUEST['mapto'] ) ? $_REQUEST['mapto'] : array() ); |
|
438 | + $mapto = (array) (isset($_REQUEST['mapto']) ? $_REQUEST['mapto'] : array()); |
|
439 | 439 | |
440 | - foreach ( $raw_key as $index => $value ) { |
|
440 | + foreach ($raw_key as $index => $value) { |
|
441 | 441 | ?> |
442 | 442 | <tr valign="top" class="give-import-option"> |
443 | 443 | <th><?php echo $value; ?></th> |
444 | 444 | <th> |
445 | 445 | <?php |
446 | - $this->get_columns( $index, $donations, $donors, $forms, $value, $mapto ); |
|
446 | + $this->get_columns($index, $donations, $donors, $forms, $value, $mapto); |
|
447 | 447 | ?> |
448 | 448 | </th> |
449 | 449 | </tr> |
@@ -458,11 +458,11 @@ discard block |
||
458 | 458 | * |
459 | 459 | * @return string |
460 | 460 | */ |
461 | - public function selected( $option_value, $value ) { |
|
461 | + public function selected($option_value, $value) { |
|
462 | 462 | $selected = ''; |
463 | - if ( stristr( $value, $option_value ) ) { |
|
463 | + if (stristr($value, $option_value)) { |
|
464 | 464 | $selected = 'selected'; |
465 | - } elseif ( strrpos( $value, '_' ) && stristr( $option_value, 'Import as Meta' ) ) { |
|
465 | + } elseif (strrpos($value, '_') && stristr($option_value, 'Import as Meta')) { |
|
466 | 466 | $selected = 'selected'; |
467 | 467 | } |
468 | 468 | |
@@ -474,16 +474,16 @@ discard block |
||
474 | 474 | * |
475 | 475 | * @since 1.8.14 |
476 | 476 | */ |
477 | - public function get_columns( $index, $donations, $donors, $forms, $value = false, $mapto = array() ) { |
|
477 | + public function get_columns($index, $donations, $donors, $forms, $value = false, $mapto = array()) { |
|
478 | 478 | $default = give_import_default_options(); |
479 | - $current_mapto = (string) ( ! empty( $mapto[ $index ] ) ? $mapto[ $index ] : '' ); |
|
479 | + $current_mapto = (string) ( ! empty($mapto[$index]) ? $mapto[$index] : ''); |
|
480 | 480 | ?> |
481 | 481 | <select name="mapto[<?php echo $index; ?>]"> |
482 | 482 | <?php |
483 | - foreach ( $default as $option => $option_value ) { |
|
484 | - $checked = ( ( $current_mapto === $option ) ? 'selected' : false ); |
|
485 | - if ( empty( $checked ) ) { |
|
486 | - $checked = $this->selected( $option_value, $value ); |
|
483 | + foreach ($default as $option => $option_value) { |
|
484 | + $checked = (($current_mapto === $option) ? 'selected' : false); |
|
485 | + if (empty($checked)) { |
|
486 | + $checked = $this->selected($option_value, $value); |
|
487 | 487 | } |
488 | 488 | ?> |
489 | 489 | <option value="<?php echo $option; ?>" <?php echo $checked; ?> ><?php echo $option_value; ?></option> |
@@ -492,10 +492,10 @@ discard block |
||
492 | 492 | ?> |
493 | 493 | <optgroup label="Donations"> |
494 | 494 | <?php |
495 | - foreach ( $donations as $option => $option_value ) { |
|
496 | - $checked = ( ( $current_mapto === $option ) ? 'selected' : false ); |
|
497 | - if ( empty( $checked ) ) { |
|
498 | - $checked = $this->selected( $option_value, $value ); |
|
495 | + foreach ($donations as $option => $option_value) { |
|
496 | + $checked = (($current_mapto === $option) ? 'selected' : false); |
|
497 | + if (empty($checked)) { |
|
498 | + $checked = $this->selected($option_value, $value); |
|
499 | 499 | } |
500 | 500 | ?> |
501 | 501 | <option value="<?php echo $option; ?>" <?php echo $checked; ?> ><?php echo $option_value; ?></option> |
@@ -506,10 +506,10 @@ discard block |
||
506 | 506 | |
507 | 507 | <optgroup label="Donors"> |
508 | 508 | <?php |
509 | - foreach ( $donors as $option => $option_value ) { |
|
510 | - $checked = ( ( $current_mapto === $option ) ? 'selected' : false ); |
|
511 | - if ( empty( $checked ) ) { |
|
512 | - $checked = $this->selected( $option_value, $value ); |
|
509 | + foreach ($donors as $option => $option_value) { |
|
510 | + $checked = (($current_mapto === $option) ? 'selected' : false); |
|
511 | + if (empty($checked)) { |
|
512 | + $checked = $this->selected($option_value, $value); |
|
513 | 513 | } |
514 | 514 | ?> |
515 | 515 | <option value="<?php echo $option; ?>" <?php echo $checked; ?> ><?php echo $option_value; ?></option> |
@@ -520,10 +520,10 @@ discard block |
||
520 | 520 | |
521 | 521 | <optgroup label="Forms"> |
522 | 522 | <?php |
523 | - foreach ( $forms as $option => $option_value ) { |
|
524 | - $checked = ( ( $current_mapto === $option ) ? 'selected' : false ); |
|
525 | - if ( empty( $checked ) ) { |
|
526 | - $checked = $this->selected( $option_value, $value ); |
|
523 | + foreach ($forms as $option => $option_value) { |
|
524 | + $checked = (($current_mapto === $option) ? 'selected' : false); |
|
525 | + if (empty($checked)) { |
|
526 | + $checked = $this->selected($option_value, $value); |
|
527 | 527 | } |
528 | 528 | ?> |
529 | 529 | <option value="<?php echo $option; ?>" <?php echo $checked; ?> ><?php echo $option_value; ?></option> |
@@ -533,7 +533,7 @@ discard block |
||
533 | 533 | </optgroup> |
534 | 534 | |
535 | 535 | <?php |
536 | - do_action( 'give_import_dropdown_option', $index, $donations, $donors, $forms, $value ); |
|
536 | + do_action('give_import_dropdown_option', $index, $donations, $donors, $forms, $value); |
|
537 | 537 | ?> |
538 | 538 | </select> |
539 | 539 | <?php |
@@ -548,13 +548,13 @@ discard block |
||
548 | 548 | * |
549 | 549 | * @return bool|int |
550 | 550 | */ |
551 | - public function get_csv_total( $file_id ) { |
|
551 | + public function get_csv_total($file_id) { |
|
552 | 552 | $total = false; |
553 | - if ( $file_id ) { |
|
554 | - $file_dir = get_attached_file( $file_id ); |
|
555 | - if ( $file_dir ) { |
|
556 | - $file = new SplFileObject( $file_dir, 'r' ); |
|
557 | - $file->seek( PHP_INT_MAX ); |
|
553 | + if ($file_id) { |
|
554 | + $file_dir = get_attached_file($file_id); |
|
555 | + if ($file_dir) { |
|
556 | + $file = new SplFileObject($file_dir, 'r'); |
|
557 | + $file->seek(PHP_INT_MAX); |
|
558 | 558 | $total = $file->key() + 1; |
559 | 559 | } |
560 | 560 | } |
@@ -573,7 +573,7 @@ discard block |
||
573 | 573 | * |
574 | 574 | * @return array|bool $raw_data title of the CSV file fields |
575 | 575 | */ |
576 | - public function get_importer( $file_id, $index = 0, $delimiter = 'csv' ) { |
|
576 | + public function get_importer($file_id, $index = 0, $delimiter = 'csv') { |
|
577 | 577 | /** |
578 | 578 | * Filter to modify delimiter of Import. |
579 | 579 | * |
@@ -581,16 +581,16 @@ discard block |
||
581 | 581 | * |
582 | 582 | * Return string $delimiter. |
583 | 583 | */ |
584 | - $delimiter = (string) apply_filters( 'give_import_delimiter_set', $delimiter ); |
|
584 | + $delimiter = (string) apply_filters('give_import_delimiter_set', $delimiter); |
|
585 | 585 | |
586 | 586 | $raw_data = false; |
587 | - $file_dir = get_attached_file( $file_id ); |
|
588 | - if ( $file_dir ) { |
|
589 | - if ( false !== ( $handle = fopen( $file_dir, 'r' ) ) ) { |
|
590 | - $raw_data = fgetcsv( $handle, $index, $delimiter ); |
|
587 | + $file_dir = get_attached_file($file_id); |
|
588 | + if ($file_dir) { |
|
589 | + if (false !== ($handle = fopen($file_dir, 'r'))) { |
|
590 | + $raw_data = fgetcsv($handle, $index, $delimiter); |
|
591 | 591 | // Remove BOM signature from the first item. |
592 | - if ( isset( $raw_data[0] ) ) { |
|
593 | - $raw_data[0] = $this->remove_utf8_bom( $raw_data[0] ); |
|
592 | + if (isset($raw_data[0])) { |
|
593 | + $raw_data[0] = $this->remove_utf8_bom($raw_data[0]); |
|
594 | 594 | } |
595 | 595 | } |
596 | 596 | } |
@@ -607,9 +607,9 @@ discard block |
||
607 | 607 | * |
608 | 608 | * @return string |
609 | 609 | */ |
610 | - public function remove_utf8_bom( $string ) { |
|
611 | - if ( 'efbbbf' === substr( bin2hex( $string ), 0, 6 ) ) { |
|
612 | - $string = substr( $string, 3 ); |
|
610 | + public function remove_utf8_bom($string) { |
|
611 | + if ('efbbbf' === substr(bin2hex($string), 0, 6)) { |
|
612 | + $string = substr($string, 3); |
|
613 | 613 | } |
614 | 614 | |
615 | 615 | return $string; |
@@ -625,17 +625,17 @@ discard block |
||
625 | 625 | $step = $this->get_step(); |
626 | 626 | ?> |
627 | 627 | <ol class="give-progress-steps"> |
628 | - <li class="<?php echo( 1 === $step ? 'active' : '' ); ?>"> |
|
629 | - <?php esc_html_e( 'Upload CSV file', 'give' ); ?> |
|
628 | + <li class="<?php echo(1 === $step ? 'active' : ''); ?>"> |
|
629 | + <?php esc_html_e('Upload CSV file', 'give'); ?> |
|
630 | 630 | </li> |
631 | - <li class="<?php echo( 2 === $step ? 'active' : '' ); ?>"> |
|
632 | - <?php esc_html_e( 'Column mapping', 'give' ); ?> |
|
631 | + <li class="<?php echo(2 === $step ? 'active' : ''); ?>"> |
|
632 | + <?php esc_html_e('Column mapping', 'give'); ?> |
|
633 | 633 | </li> |
634 | - <li class="<?php echo( 3 === $step ? 'active' : '' ); ?>"> |
|
635 | - <?php esc_html_e( 'Import', 'give' ); ?> |
|
634 | + <li class="<?php echo(3 === $step ? 'active' : ''); ?>"> |
|
635 | + <?php esc_html_e('Import', 'give'); ?> |
|
636 | 636 | </li> |
637 | - <li class="<?php echo( 4 === $step ? 'active' : '' ); ?>"> |
|
638 | - <?php esc_html_e( 'Done!', 'give' ); ?> |
|
637 | + <li class="<?php echo(4 === $step ? 'active' : ''); ?>"> |
|
638 | + <?php esc_html_e('Done!', 'give'); ?> |
|
639 | 639 | </li> |
640 | 640 | </ol> |
641 | 641 | <?php |
@@ -649,16 +649,16 @@ discard block |
||
649 | 649 | * @return int $step on which step doest the import is on. |
650 | 650 | */ |
651 | 651 | public function get_step() { |
652 | - $step = (int) ( isset( $_REQUEST['step'] ) ? give_clean( $_REQUEST['step'] ) : 0 ); |
|
652 | + $step = (int) (isset($_REQUEST['step']) ? give_clean($_REQUEST['step']) : 0); |
|
653 | 653 | $on_step = 1; |
654 | 654 | |
655 | - if ( empty( $step ) || 1 === $step ) { |
|
655 | + if (empty($step) || 1 === $step) { |
|
656 | 656 | $on_step = 1; |
657 | - } elseif ( $this->check_for_dropdown_or_import() ) { |
|
657 | + } elseif ($this->check_for_dropdown_or_import()) { |
|
658 | 658 | $on_step = 3; |
659 | - } elseif ( 2 === $step ) { |
|
659 | + } elseif (2 === $step) { |
|
660 | 660 | $on_step = 2; |
661 | - } elseif ( 4 === $step ) { |
|
661 | + } elseif (4 === $step) { |
|
662 | 662 | $on_step = 4; |
663 | 663 | } |
664 | 664 | |
@@ -671,7 +671,7 @@ discard block |
||
671 | 671 | * @since 1.8.14 |
672 | 672 | */ |
673 | 673 | public function render_page() { |
674 | - include_once GIVE_PLUGIN_DIR . 'includes/admin/tools/views/html-admin-page-import-donations.php'; |
|
674 | + include_once GIVE_PLUGIN_DIR.'includes/admin/tools/views/html-admin-page-import-donations.php'; |
|
675 | 675 | } |
676 | 676 | |
677 | 677 | /** |
@@ -686,36 +686,33 @@ discard block |
||
686 | 686 | ?> |
687 | 687 | <tr valign="top"> |
688 | 688 | <th colspan="2"> |
689 | - <h2 id="give-import-title"><?php esc_html_e( 'Import donations from a CSV file', 'give' ) ?></h2> |
|
690 | - <p class="give-field-description"><?php esc_html_e( 'This tool allows you to import or add donation data to your give form(s) via a CSV file.', 'give' ) ?></p> |
|
689 | + <h2 id="give-import-title"><?php esc_html_e('Import donations from a CSV file', 'give') ?></h2> |
|
690 | + <p class="give-field-description"><?php esc_html_e('This tool allows you to import or add donation data to your give form(s) via a CSV file.', 'give') ?></p> |
|
691 | 691 | </th> |
692 | 692 | </tr> |
693 | 693 | <?php |
694 | - $csv = ( isset( $_POST['csv'] ) ? give_clean( $_POST['csv'] ) : '' ); |
|
695 | - $csv_id = ( isset( $_POST['csv_id'] ) ? give_clean( $_POST['csv_id'] ) : '' ); |
|
696 | - $delimiter = ( isset( $_POST['delimiter'] ) ? give_clean( $_POST['delimiter'] ) : 'csv' ); |
|
697 | - $mode = empty( $_POST['mode'] ) ? |
|
698 | - 'disabled' : |
|
699 | - ( give_is_setting_enabled( give_clean( $_POST['mode'] ) ) ? 'enabled' : 'disabled' ); |
|
700 | - $create_user = empty( $_POST['create_user'] ) ? |
|
701 | - 'enabled' : |
|
702 | - ( give_is_setting_enabled( give_clean( $_POST['create_user'] ) ) ? 'enabled' : 'disabled' ); |
|
703 | - $delete_csv = empty( $_POST['delete_csv'] ) ? |
|
704 | - 'enabled' : |
|
705 | - ( give_is_setting_enabled( give_clean( $_POST['delete_csv'] ) ) ? 'enabled' : 'disabled' ); |
|
694 | + $csv = (isset($_POST['csv']) ? give_clean($_POST['csv']) : ''); |
|
695 | + $csv_id = (isset($_POST['csv_id']) ? give_clean($_POST['csv_id']) : ''); |
|
696 | + $delimiter = (isset($_POST['delimiter']) ? give_clean($_POST['delimiter']) : 'csv'); |
|
697 | + $mode = empty($_POST['mode']) ? |
|
698 | + 'disabled' : (give_is_setting_enabled(give_clean($_POST['mode'])) ? 'enabled' : 'disabled'); |
|
699 | + $create_user = empty($_POST['create_user']) ? |
|
700 | + 'enabled' : (give_is_setting_enabled(give_clean($_POST['create_user'])) ? 'enabled' : 'disabled'); |
|
701 | + $delete_csv = empty($_POST['delete_csv']) ? |
|
702 | + 'enabled' : (give_is_setting_enabled(give_clean($_POST['delete_csv'])) ? 'enabled' : 'disabled'); |
|
706 | 703 | |
707 | 704 | // Reset csv and csv_id if csv |
708 | - if ( empty( $csv_id ) || ! $this->is_valid_csv( $csv_id, $csv ) ) { |
|
705 | + if (empty($csv_id) || ! $this->is_valid_csv($csv_id, $csv)) { |
|
709 | 706 | $csv_id = $csv = ''; |
710 | 707 | } |
711 | 708 | |
712 | 709 | $settings = array( |
713 | 710 | array( |
714 | 711 | 'id' => 'csv', |
715 | - 'name' => __( 'Choose a CSV file:', 'give' ), |
|
712 | + 'name' => __('Choose a CSV file:', 'give'), |
|
716 | 713 | 'type' => 'file', |
717 | - 'attributes' => array( 'editing' => 'false', 'library' => 'text' ), |
|
718 | - 'description' => __( 'The file must be a Comma Seperated Version (CSV) file type only.', 'give' ), |
|
714 | + 'attributes' => array('editing' => 'false', 'library' => 'text'), |
|
715 | + 'description' => __('The file must be a Comma Seperated Version (CSV) file type only.', 'give'), |
|
719 | 716 | 'fvalue' => 'url', |
720 | 717 | 'default' => $csv, |
721 | 718 | ), |
@@ -726,53 +723,53 @@ discard block |
||
726 | 723 | ), |
727 | 724 | array( |
728 | 725 | 'id' => 'delimiter', |
729 | - 'name' => __( 'CSV Delimiter:', 'give' ), |
|
730 | - 'description' => __( 'In case your CSV file supports a different type of separator (or delimiter) -- like a tab or space -- you can set that here.', 'give' ), |
|
726 | + 'name' => __('CSV Delimiter:', 'give'), |
|
727 | + 'description' => __('In case your CSV file supports a different type of separator (or delimiter) -- like a tab or space -- you can set that here.', 'give'), |
|
731 | 728 | 'default' => $delimiter, |
732 | 729 | 'type' => 'select', |
733 | 730 | 'options' => array( |
734 | - 'csv' => esc_html__( 'Comma', 'give' ), |
|
735 | - 'tab-separated-values' => esc_html__( 'Tab', 'give' ), |
|
731 | + 'csv' => esc_html__('Comma', 'give'), |
|
732 | + 'tab-separated-values' => esc_html__('Tab', 'give'), |
|
736 | 733 | ), |
737 | 734 | ), |
738 | 735 | array( |
739 | 736 | 'id' => 'mode', |
740 | - 'name' => __( 'Test Mode:', 'give' ), |
|
741 | - 'description' => __( 'Test mode allows you to preview what this import would look like without making any actual changes to your site or your database.', 'give' ), |
|
737 | + 'name' => __('Test Mode:', 'give'), |
|
738 | + 'description' => __('Test mode allows you to preview what this import would look like without making any actual changes to your site or your database.', 'give'), |
|
742 | 739 | 'default' => $mode, |
743 | 740 | 'type' => 'radio_inline', |
744 | 741 | 'options' => array( |
745 | - 'enabled' => __( 'Enabled', 'give' ), |
|
746 | - 'disabled' => __( 'Disabled', 'give' ), |
|
742 | + 'enabled' => __('Enabled', 'give'), |
|
743 | + 'disabled' => __('Disabled', 'give'), |
|
747 | 744 | ), |
748 | 745 | ), |
749 | 746 | array( |
750 | 747 | 'id' => 'create_user', |
751 | - 'name' => __( 'Create WP users for new donors:', 'give' ), |
|
752 | - 'description' => __( 'The importer can create WordPress user accounts based on the names and email addresses of the donations in your CSV file. Enable this option if you\'d like the importer to do that.', 'give' ), |
|
748 | + 'name' => __('Create WP users for new donors:', 'give'), |
|
749 | + 'description' => __('The importer can create WordPress user accounts based on the names and email addresses of the donations in your CSV file. Enable this option if you\'d like the importer to do that.', 'give'), |
|
753 | 750 | 'default' => $create_user, |
754 | 751 | 'type' => 'radio_inline', |
755 | 752 | 'options' => array( |
756 | - 'enabled' => __( 'Enabled', 'give' ), |
|
757 | - 'disabled' => __( 'Disabled', 'give' ), |
|
753 | + 'enabled' => __('Enabled', 'give'), |
|
754 | + 'disabled' => __('Disabled', 'give'), |
|
758 | 755 | ), |
759 | 756 | ), |
760 | 757 | array( |
761 | 758 | 'id' => 'delete_csv', |
762 | - 'name' => __( 'Delete CSV after import:', 'give' ), |
|
763 | - 'description' => __( 'Your CSV file will be uploaded via the WordPress Media Library. It\'s a good idea to delete it after the import is finished so that your sensitive data is not accessible on the web. Disable this only if you plan to delete the file manually later.', 'give' ), |
|
759 | + 'name' => __('Delete CSV after import:', 'give'), |
|
760 | + 'description' => __('Your CSV file will be uploaded via the WordPress Media Library. It\'s a good idea to delete it after the import is finished so that your sensitive data is not accessible on the web. Disable this only if you plan to delete the file manually later.', 'give'), |
|
764 | 761 | 'default' => $delete_csv, |
765 | 762 | 'type' => 'radio_inline', |
766 | 763 | 'options' => array( |
767 | - 'enabled' => __( 'Enabled', 'give' ), |
|
768 | - 'disabled' => __( 'Disabled', 'give' ), |
|
764 | + 'enabled' => __('Enabled', 'give'), |
|
765 | + 'disabled' => __('Disabled', 'give'), |
|
769 | 766 | ), |
770 | 767 | ), |
771 | 768 | ); |
772 | 769 | |
773 | - $settings = apply_filters( 'give_import_file_upload_html', $settings ); |
|
770 | + $settings = apply_filters('give_import_file_upload_html', $settings); |
|
774 | 771 | |
775 | - Give_Admin_Settings::output_fields( $settings, 'give_settings' ); |
|
772 | + Give_Admin_Settings::output_fields($settings, 'give_settings'); |
|
776 | 773 | } |
777 | 774 | |
778 | 775 | /** |
@@ -785,26 +782,23 @@ discard block |
||
785 | 782 | $step = $this->get_step(); |
786 | 783 | |
787 | 784 | // Validation for first step. |
788 | - if ( 1 === $step ) { |
|
789 | - $csv_id = absint( $_POST['csv_id'] ); |
|
785 | + if (1 === $step) { |
|
786 | + $csv_id = absint($_POST['csv_id']); |
|
790 | 787 | |
791 | - if ( $this->is_valid_csv( $csv_id, esc_url( $_POST['csv'] ) ) ) { |
|
788 | + if ($this->is_valid_csv($csv_id, esc_url($_POST['csv']))) { |
|
792 | 789 | |
793 | - $url = give_import_page_url( (array) apply_filters( 'give_import_step_two_url', array( |
|
790 | + $url = give_import_page_url((array) apply_filters('give_import_step_two_url', array( |
|
794 | 791 | 'step' => '2', |
795 | 792 | 'importer-type' => $this->importer_type, |
796 | 793 | 'csv' => $csv_id, |
797 | - 'delimiter' => isset( $_REQUEST['delimiter'] ) ? give_clean( $_REQUEST['delimiter'] ) : 'csv', |
|
798 | - 'mode' => empty( $_POST['mode'] ) ? |
|
799 | - '0' : |
|
800 | - ( give_is_setting_enabled( give_clean( $_POST['mode'] ) ) ? '1' : '0' ), |
|
801 | - 'create_user' => empty( $_POST['create_user'] ) ? |
|
802 | - '0' : |
|
803 | - ( give_is_setting_enabled( give_clean( $_POST['create_user'] ) ) ? '1' : '0' ), |
|
804 | - 'delete_csv' => empty( $_POST['delete_csv'] ) ? |
|
805 | - '1' : |
|
806 | - ( give_is_setting_enabled( give_clean( $_POST['delete_csv'] ) ) ? '1' : '0' ), |
|
807 | - ) ) ); |
|
794 | + 'delimiter' => isset($_REQUEST['delimiter']) ? give_clean($_REQUEST['delimiter']) : 'csv', |
|
795 | + 'mode' => empty($_POST['mode']) ? |
|
796 | + '0' : (give_is_setting_enabled(give_clean($_POST['mode'])) ? '1' : '0'), |
|
797 | + 'create_user' => empty($_POST['create_user']) ? |
|
798 | + '0' : (give_is_setting_enabled(give_clean($_POST['create_user'])) ? '1' : '0'), |
|
799 | + 'delete_csv' => empty($_POST['delete_csv']) ? |
|
800 | + '1' : (give_is_setting_enabled(give_clean($_POST['delete_csv'])) ? '1' : '0'), |
|
801 | + ))); |
|
808 | 802 | ?> |
809 | 803 | <script type="text/javascript"> |
810 | 804 | window.location = "<?php echo $url; ?>" |
@@ -825,25 +819,25 @@ discard block |
||
825 | 819 | * |
826 | 820 | * @return bool $has_error CSV is valid or not. |
827 | 821 | */ |
828 | - private function is_valid_csv( $csv = false, $match_url = '' ) { |
|
822 | + private function is_valid_csv($csv = false, $match_url = '') { |
|
829 | 823 | $is_valid_csv = true; |
830 | 824 | |
831 | - if ( $csv ) { |
|
832 | - $csv_url = wp_get_attachment_url( $csv ); |
|
825 | + if ($csv) { |
|
826 | + $csv_url = wp_get_attachment_url($csv); |
|
833 | 827 | |
834 | - $delimiter = ( ! empty( $_REQUEST['delimiter'] ) ? give_clean( $_REQUEST['delimiter'] ) : 'csv' ); |
|
828 | + $delimiter = ( ! empty($_REQUEST['delimiter']) ? give_clean($_REQUEST['delimiter']) : 'csv'); |
|
835 | 829 | |
836 | 830 | if ( |
837 | 831 | ! $csv_url || |
838 | - ( ! empty( $match_url ) && ( $csv_url !== $match_url ) ) || |
|
839 | - ( ( $mime_type = get_post_mime_type( $csv ) ) && ! strpos( $mime_type, $delimiter ) ) |
|
832 | + ( ! empty($match_url) && ($csv_url !== $match_url)) || |
|
833 | + (($mime_type = get_post_mime_type($csv)) && ! strpos($mime_type, $delimiter)) |
|
840 | 834 | ) { |
841 | 835 | $is_valid_csv = false; |
842 | - Give_Admin_Settings::add_error( 'give-import-csv', __( 'Please upload or provide a valid CSV file.', 'give' ) ); |
|
836 | + Give_Admin_Settings::add_error('give-import-csv', __('Please upload or provide a valid CSV file.', 'give')); |
|
843 | 837 | } |
844 | 838 | } else { |
845 | 839 | $is_valid_csv = false; |
846 | - Give_Admin_Settings::add_error( 'give-import-csv', __( 'Please upload or provide a valid CSV file.', 'give' ) ); |
|
840 | + Give_Admin_Settings::add_error('give-import-csv', __('Please upload or provide a valid CSV file.', 'give')); |
|
847 | 841 | } |
848 | 842 | |
849 | 843 | return $is_valid_csv; |
@@ -859,8 +853,8 @@ discard block |
||
859 | 853 | * @param $field |
860 | 854 | * @param $option_value |
861 | 855 | */ |
862 | - public function render_import_field( $field, $option_value ) { |
|
863 | - include_once GIVE_PLUGIN_DIR . 'includes/admin/tools/views/html-admin-page-imports.php'; |
|
856 | + public function render_import_field($field, $option_value) { |
|
857 | + include_once GIVE_PLUGIN_DIR.'includes/admin/tools/views/html-admin-page-imports.php'; |
|
864 | 858 | } |
865 | 859 | |
866 | 860 | /** |
@@ -871,8 +865,8 @@ discard block |
||
871 | 865 | */ |
872 | 866 | private function is_donations_import_page() { |
873 | 867 | return 'import' === give_get_current_setting_tab() && |
874 | - isset( $_GET['importer-type'] ) && |
|
875 | - $this->importer_type === give_clean( $_GET['importer-type'] ); |
|
868 | + isset($_GET['importer-type']) && |
|
869 | + $this->importer_type === give_clean($_GET['importer-type']); |
|
876 | 870 | } |
877 | 871 | } |
878 | 872 |