PluginProbe
GiveWP – Donation Plugin and Fundraising Platform / 4.18.0
GiveWP – Donation Plugin and Fundraising Platform v4.18.0
4.18.0 4.17.0 4.16.9 4.16.8.1 4.16.8 4.16.7.2 4.16.7.1 4.16.7 4.16.6.1 4.16.6 4.16.5.1 4.16.5 4.16.4 4.16.3 4.16.2 4.16.1 4.16.0 4.15.5 4.15.4 4.15.3 4.15.2 4.15.1 4.15.0 2.3.0 2.3.1 All 257 releases
← All changes | includes/country-functions.php +483 -374 2.3.0 → 4.18.0 View file →
@@ -3,9 +3,9 @@
3 3 * Country Functions
4 4 *
5 5 * @package Give
6 6 * @subpackage Functions
7 - * @copyright Copyright (c) 2016, WordImpress
7 + * @copyright Copyright (c) 2016, GiveWP
8 8 * @license https://opensource.org/licenses/gpl-license GNU Public License
9 9 * @since 1.0
10 10 */
11 11
@@ -50,13 +50,13 @@
50 50 * @return mixed A list of states for the site's base country.
51 51 */
52 52 function give_get_states( $country = null ) {
53 53 // If Country have no states return empty array.
54 - $states = array();
54 + $states = [];
55 55
56 56 // Check if Country Code is empty or not.
57 57 if ( empty( $country ) ) {
58 - // Get defalut country code that is being set by the admin.
58 + // Get default country code that is being set by the admin.
59 59 $country = give_get_country();
60 60 }
61 61
62 62 // Get all the list of the states in array key format where key is the country code and value is the states that it contain.
@@ -81,9 +81,9 @@
81 81 * @since 1.0
82 82 * @return array $countries A list of the available countries.
83 83 */
84 84 function give_get_country_list() {
85 - $countries = array(
85 + $countries = [
86 86 '' => '',
87 87 'US' => esc_html__( 'United States', 'give' ),
88 88 'CA' => esc_html__( 'Canada', 'give' ),
89 89 'GB' => esc_html__( 'United Kingdom', 'give' ),
@@ -140,8 +140,9 @@
140 140 'CR' => esc_html__( 'Costa Rica', 'give' ),
141 141 'CI' => esc_html__( 'Cote d\'Ivoire', 'give' ),
142 142 'HR' => esc_html__( 'Croatia/Hrvatska', 'give' ),
143 143 'CU' => esc_html__( 'Cuba', 'give' ),
144 + 'CW' => esc_html__( 'Curaçao', 'give' ),
144 145 'CY' => esc_html__( 'Cyprus Island', 'give' ),
145 146 'CZ' => esc_html__( 'Czech Republic', 'give' ),
146 147 'DK' => esc_html__( 'Denmark', 'give' ),
147 148 'DJ' => esc_html__( 'Djibouti', 'give' ),
@@ -237,10 +238,9 @@
237 238 'MM' => esc_html__( 'Myanmar', 'give' ),
238 239 'NA' => esc_html__( 'Namibia', 'give' ),
239 240 'NR' => esc_html__( 'Nauru', 'give' ),
240 241 'NP' => esc_html__( 'Nepal', 'give' ),
241 - 'NL' => esc_html__( 'Netherlands', 'give' ),
242 - 'AN' => esc_html__( 'Netherlands Antilles', 'give' ),
242 + 'NL' => esc_html__('Netherlands', 'give'),
243 243 'NC' => esc_html__( 'New Caledonia', 'give' ),
244 244 'NZ' => esc_html__( 'New Zealand', 'give' ),
245 245 'NI' => esc_html__( 'Nicaragua', 'give' ),
246 246 'NE' => esc_html__( 'Niger', 'give' ),
@@ -292,9 +292,9 @@
292 292 'LK' => esc_html__( 'Sri Lanka', 'give' ),
293 293 'SD' => esc_html__( 'Sudan', 'give' ),
294 294 'SR' => esc_html__( 'Suriname', 'give' ),
295 295 'SJ' => esc_html__( 'Svalbard and Jan Mayen Islands', 'give' ),
296 - 'SZ' => esc_html__( 'Swaziland', 'give' ),
296 + 'SZ' => esc_html__( 'Eswatini', 'give' ),
297 297 'SE' => esc_html__( 'Sweden', 'give' ),
298 298 'CH' => esc_html__( 'Switzerland', 'give' ),
299 299 'SY' => esc_html__( 'Syrian Arab Republic', 'give' ),
300 300 'TW' => esc_html__( 'Taiwan', 'give' ),
@@ -327,9 +327,9 @@
327 327 'YE' => esc_html__( 'Yemen', 'give' ),
328 328 'YU' => esc_html__( 'Yugoslavia', 'give' ),
329 329 'ZM' => esc_html__( 'Zambia', 'give' ),
330 330 'ZW' => esc_html__( 'Zimbabwe', 'give' ),
331 - );
331 + ];
332 332
333 333 return (array) apply_filters( 'give_countries', $countries );
334 334 }
335 335
@@ -340,9 +340,9 @@
340 340 *
341 341 * @return array $states A list of the available states as in array key format.
342 342 */
343 343 function give_states_list() {
344 - $states = array(
344 + $states = [
345 345 'US' => give_get_states_list(),
346 346 'CA' => give_get_provinces_list(),
347 347 'AU' => give_get_australian_states_list(),
348 348 'BR' => give_get_brazil_states_list(),
@@ -372,9 +372,9 @@
372 372 'BO' => give_get_bolivian_states_list(),
373 373 'BG' => give_get_bulgarian_states_list(),
374 374 'BD' => give_get_bangladeshi_states_list(),
375 375 'AR' => give_get_argentina_states_list(),
376 - );
376 + ];
377 377
378 378 /**
379 379 * Filter can be used to add or remove the States from the Country.
380 380 *
@@ -396,9 +396,9 @@
396 396 *
397 397 * $$country array $country_code.
398 398 */
399 399 function give_no_states_country_list() {
400 - $country_list = array();
400 + $country_list = [];
401 401 $locale = give_get_country_locale();
402 402 foreach ( $locale as $key => $value ) {
403 403 if ( ! empty( $value['state'] ) && isset( $value['state']['hidden'] ) && true === $value['state']['hidden'] ) {
404 404 $country_list[ $key ] = $value['state'];
@@ -424,9 +424,9 @@
424 424 *
425 425 * $country array $country_code.
426 426 */
427 427 function give_states_not_required_country_list() {
428 - $country_list = array();
428 + $country_list = [];
429 429 $locale = give_get_country_locale();
430 430 foreach ( $locale as $key => $value ) {
431 431 if ( ! empty( $value['state'] ) && isset( $value['state']['required'] ) && false === $value['state']['required'] ) {
432 432 $country_list[ $key ] = $value['state'];
@@ -452,9 +452,9 @@
452 452 *
453 453 * $country array $country_list.
454 454 */
455 455 function give_city_not_required_country_list() {
456 - $country_list = array();
456 + $country_list = [];
457 457 $locale = give_get_country_locale();
458 458 foreach ( $locale as $key => $value ) {
459 459 if ( ! empty( $value['city'] ) && isset( $value['city']['required'] ) && false === $value['city']['required'] ) {
460 460 $country_list[ $key ] = $value['city'];
@@ -497,9 +497,9 @@
497 497 *
498 498 * @return array $country_states_label
499 499 */
500 500 function give_get_states_label() {
501 - $country_states_label = array();
501 + $country_states_label = [];
502 502 $default_label = __( 'State', 'give' );
503 503 $locale = give_get_country_locale();
504 504 foreach ( $locale as $key => $value ) {
505 505 $label = $default_label;
@@ -526,305 +526,319 @@
526 526 *
527 527 * @return array
528 528 */
529 529 function give_get_country_locale() {
530 - return (array) apply_filters( 'give_get_country_locale', array(
531 - 'AE' => array(
532 - 'state' => array(
533 - 'required' => false,
534 - ),
535 - ),
536 - 'AF' => array(
537 - 'state' => array(
538 - 'required' => false,
539 - 'hidden' => true,
540 - ),
541 - ),
542 - 'AT' => array(
543 - 'state' => array(
544 - 'required' => false,
545 - 'hidden' => true,
546 - ),
547 - ),
548 - 'AU' => array(
549 - 'state' => array(
550 - 'label' => __( 'State', 'give' ),
551 - ),
552 - ),
553 - 'AX' => array(
554 - 'state' => array(
555 - 'required' => false,
556 - ),
557 - ),
558 - 'BD' => array(
559 - 'state' => array(
560 - 'label' => __( 'District', 'give' ),
561 - ),
562 - ),
563 - 'BE' => array(
564 - 'state' => array(
565 - 'required' => false,
566 - 'label' => __( 'Province', 'give' ),
567 - 'hidden' => true,
568 - ),
569 - ),
570 - 'BI' => array(
571 - 'state' => array(
572 - 'required' => false,
573 - ),
574 - ),
575 - 'CA' => array(
576 - 'state' => array(
577 - 'label' => __( 'Province', 'give' ),
578 - ),
579 - ),
580 - 'CH' => array(
581 - 'state' => array(
582 - 'label' => __( 'Canton', 'give' ),
583 - 'required' => false,
584 - 'hidden' => true,
585 - ),
586 - ),
587 - 'CL' => array(
588 - 'state' => array(
589 - 'label' => __( 'Region', 'give' ),
590 - ),
591 - ),
592 - 'CN' => array(
593 - 'state' => array(
594 - 'label' => __( 'Province', 'give' ),
595 - ),
596 - ),
597 - 'CZ' => array(
598 - 'state' => array(
599 - 'required' => false,
600 - 'hidden' => true,
601 - ),
602 - ),
603 - 'DE' => array(
604 - 'state' => array(
605 - 'required' => false,
606 - 'hidden' => true,
607 - ),
608 - ),
609 - 'DK' => array(
610 - 'state' => array(
611 - 'required' => false,
612 - 'hidden' => true,
613 - ),
614 - ),
615 - 'EE' => array(
616 - 'state' => array(
617 - 'required' => false,
618 - 'hidden' => true,
619 - ),
620 - ),
621 - 'FI' => array(
622 - 'state' => array(
623 - 'required' => false,
624 - 'hidden' => true,
625 - ),
626 - ),
627 - 'FR' => array(
628 - 'state' => array(
629 - 'required' => false,
630 - 'hidden' => true,
631 - ),
632 - ),
633 - 'GP' => array(
634 - 'state' => array(
635 - 'required' => false,
636 - ),
637 - ),
638 - 'GF' => array(
639 - 'state' => array(
640 - 'required' => false,
641 - ),
642 - ),
643 - 'HK' => array(
644 - 'state' => array(
645 - 'label' => __( 'Region', 'give' ),
646 - ),
647 - ),
648 - 'HU' => array(
649 - 'state' => array(
650 - 'label' => __( 'County', 'give' ),
651 - 'hidden' => true,
652 - ),
653 - ),
654 - 'ID' => array(
655 - 'state' => array(
656 - 'label' => __( 'Province', 'give' ),
657 - ),
658 - ),
659 - 'IE' => array(
660 - 'state' => array(
661 - 'label' => __( 'County', 'give' ),
662 - ),
663 - ),
664 - 'IS' => array(
665 - 'state' => array(
666 - 'required' => false,
667 - 'hidden' => true,
668 - ),
669 - ),
670 - 'IL' => array(
671 - 'state' => array(
672 - 'required' => false,
673 - ),
674 - ),
675 - 'IT' => array(
676 - 'state' => array(
677 - 'required' => true,
678 - 'label' => __( 'Province', 'give' ),
679 - ),
680 - ),
681 - 'JP' => array(
682 - 'state' => array(
683 - 'label' => __( 'Prefecture', 'give' ),
684 - ),
685 - ),
686 - 'KR' => array(
687 - 'state' => array(
688 - 'required' => false,
689 - ),
690 - ),
691 - 'KW' => array(
692 - 'state' => array(
693 - 'required' => false,
694 - ),
695 - ),
696 - 'LB' => array(
697 - 'state' => array(
698 - 'required' => false,
699 - ),
700 - ),
701 - 'MQ' => array(
702 - 'state' => array(
703 - 'required' => false,
704 - ),
705 - ),
706 - 'NL' => array(
707 - 'state' => array(
708 - 'required' => false,
709 - 'label' => __( 'Province', 'give' ),
710 - 'hidden' => true,
711 - ),
712 - ),
713 - 'NZ' => array(
714 - 'state' => array(
715 - 'label' => __( 'Region', 'give' ),
716 - ),
717 - ),
718 - 'NO' => array(
719 - 'state' => array(
720 - 'required' => false,
721 - 'hidden' => true,
722 - ),
723 - ),
724 - 'NP' => array(
725 - 'state' => array(
726 - 'label' => __( 'State / Zone', 'give' ),
727 - ),
728 - ),
729 - 'PL' => array(
730 - 'state' => array(
731 - 'required' => false,
732 - 'hidden' => true,
733 - ),
734 - ),
735 - 'PT' => array(
736 - 'state' => array(
737 - 'required' => false,
738 - 'hidden' => true,
739 - ),
740 - ),
741 - 'RE' => array(
742 - 'state' => array(
743 - 'required' => false,
744 - ),
745 - ),
746 - 'RO' => array(
747 - 'state' => array(
748 - 'required' => false,
749 - ),
750 - ),
751 - 'SG' => array(
752 - 'state' => array(
753 - 'required' => false,
754 - ),
755 - 'city' => array(
756 - 'required' => false,
757 - )
758 - ),
759 - 'SK' => array(
760 - 'state' => array(
761 - 'required' => false,
762 - 'hidden' => true,
763 - ),
764 - ),
765 - 'SI' => array(
766 - 'state' => array(
767 - 'required' => false,
768 - 'hidden' => true,
769 - ),
770 - ),
771 - 'ES' => array(
772 - 'state' => array(
773 - 'label' => __( 'Province', 'give' ),
774 - ),
775 - ),
776 - 'LI' => array(
777 - 'state' => array(
778 - 'label' => __( 'Municipality', 'give' ),
779 - 'required' => false,
780 - 'hidden' => true,
781 - ),
782 - ),
783 - 'LK' => array(
784 - 'state' => array(
785 - 'required' => false,
786 - ),
787 - ),
788 - 'SE' => array(
789 - 'state' => array(
790 - 'required' => false,
791 - 'hidden' => true,
792 - ),
793 - ),
794 - 'TR' => array(
795 - 'state' => array(
796 - 'label' => __( 'Province', 'give' ),
797 - ),
798 - ),
799 - 'US' => array(
800 - 'state' => array(
801 - 'label' => __( 'State', 'give' ),
802 - ),
803 - ),
804 - 'GB' => array(
805 - 'state' => array(
806 - 'label' => __( 'County', 'give' ),
807 - 'required' => false,
808 - ),
809 - ),
810 - 'VN' => array(
811 - 'state' => array(
812 - 'required' => false,
813 - 'hidden' => true,
814 - ),
815 - ),
816 - 'YT' => array(
817 - 'state' => array(
818 - 'required' => false,
819 - ),
820 - ),
821 - 'ZA' => array(
822 - 'state' => array(
823 - 'label' => __( 'Province', 'give' ),
824 - ),
825 - ),
826 - ) );
530 + return (array) apply_filters(
531 + 'give_get_country_locale',
532 + [
533 + 'AE' => [
534 + 'state' => [
535 + 'required' => false,
536 + ],
537 + ],
538 + 'AF' => [
539 + 'state' => [
540 + 'required' => false,
541 + 'hidden' => true,
542 + ],
543 + ],
544 + 'AT' => [
545 + 'state' => [
546 + 'required' => false,
547 + 'hidden' => true,
548 + ],
549 + ],
550 + 'AU' => [
551 + 'state' => [
552 + 'label' => __( 'State', 'give' ),
553 + ],
554 + ],
555 + 'AX' => [
556 + 'state' => [
557 + 'required' => false,
558 + ],
559 + ],
560 + 'BD' => [
561 + 'state' => [
562 + 'label' => __( 'District', 'give' ),
563 + ],
564 + ],
565 + 'BE' => [
566 + 'state' => [
567 + 'required' => false,
568 + 'label' => __( 'Province', 'give' ),
569 + 'hidden' => true,
570 + ],
571 + ],
572 + 'BI' => [
573 + 'state' => [
574 + 'required' => false,
575 + ],
576 + ],
577 + 'CA' => [
578 + 'state' => [
579 + 'label' => __( 'Province', 'give' ),
580 + ],
581 + ],
582 + 'CH' => [
583 + 'state' => [
584 + 'label' => __( 'Canton', 'give' ),
585 + 'required' => false,
586 + 'hidden' => true,
587 + ],
588 + ],
589 + 'CL' => [
590 + 'state' => [
591 + 'label' => __( 'Region', 'give' ),
592 + ],
593 + ],
594 + 'CN' => [
595 + 'state' => [
596 + 'label' => __( 'Province', 'give' ),
597 + ],
598 + ],
599 + 'CZ' => [
600 + 'state' => [
601 + 'required' => false,
602 + 'hidden' => true,
603 + ],
604 + ],
605 + 'DE' => [
606 + 'state' => [
607 + 'required' => false,
608 + 'hidden' => true,
609 + ],
610 + ],
611 + 'DK' => [
612 + 'state' => [
613 + 'required' => false,
614 + 'hidden' => true,
615 + ],
616 + ],
617 + 'EE' => [
618 + 'state' => [
619 + 'required' => false,
620 + 'hidden' => true,
621 + ],
622 + ],
623 + 'FI' => [
624 + 'state' => [
625 + 'required' => false,
626 + 'hidden' => true,
627 + ],
628 + ],
629 + 'FR' => [
630 + 'state' => [
631 + 'required' => false,
632 + 'hidden' => true,
633 + ],
634 + ],
635 + 'GP' => [
636 + 'state' => [
637 + 'required' => false,
638 + ],
639 + ],
640 + 'GF' => [
641 + 'state' => [
642 + 'required' => false,
643 + ],
644 + ],
645 + 'HK' => [
646 + 'state' => [
647 + 'label' => __( 'Region', 'give' ),
648 + ],
649 + ],
650 + 'HU' => [
651 + 'state' => [
652 + 'label' => __( 'County', 'give' ),
653 + ],
654 + ],
655 + 'ID' => [
656 + 'state' => [
657 + 'label' => __( 'Province', 'give' ),
658 + ],
659 + ],
660 + 'IE' => [
661 + 'state' => [
662 + 'label' => __( 'County', 'give' ),
663 + ],
664 + ],
665 + 'IS' => [
666 + 'state' => [
667 + 'required' => false,
668 + 'hidden' => true,
669 + ],
670 + ],
671 + 'IL' => [
672 + 'state' => [
673 + 'required' => false,
674 + ],
675 + ],
676 + 'IT' => [
677 + 'state' => [
678 + 'required' => true,
679 + 'label' => __( 'Province', 'give' ),
680 + ],
681 + ],
682 + 'JP' => [
683 + 'state' => [
684 + 'label' => __( 'Prefecture', 'give' ),
685 + ],
686 + ],
687 + 'KR' => [
688 + 'state' => [
689 + 'required' => false,
690 + 'hidden' => true,
691 + ],
692 + ],
693 + 'KW' => [
694 + 'state' => [
695 + 'required' => false,
696 + ],
697 + ],
698 + 'LB' => [
699 + 'state' => [
700 + 'required' => false,
701 + ],
702 + ],
703 + 'MC' => [
704 + 'state' => [
705 + 'required' => false,
706 + 'hidden' => true,
707 + ],
708 + ],
709 + 'MQ' => [
710 + 'state' => [
711 + 'required' => false,
712 + ],
713 + ],
714 + 'NL' => [
715 + 'state' => [
716 + 'required' => false,
717 + 'label' => __( 'Province', 'give' ),
718 + 'hidden' => true,
719 + ],
720 + ],
721 + 'NZ' => [
722 + 'state' => [
723 + 'label' => __( 'Region', 'give' ),
724 + ],
725 + ],
726 + 'NO' => [
727 + 'state' => [
728 + 'required' => false,
729 + 'hidden' => true,
730 + ],
731 + ],
732 + 'NP' => [
733 + 'state' => [
734 + 'label' => __( 'State / Zone', 'give' ),
735 + ],
736 + ],
737 + 'PL' => [
738 + 'state' => [
739 + 'required' => false,
740 + 'hidden' => true,
741 + ],
742 + ],
743 + 'PT' => [
744 + 'state' => [
745 + 'required' => false,
746 + 'hidden' => true,
747 + ],
748 + ],
749 + 'RE' => [
750 + 'state' => [
751 + 'required' => false,
752 + ],
753 + ],
754 + 'RO' => [
755 + 'state' => [
756 + 'required' => false,
757 + ],
758 + ],
759 + 'SG' => [
760 + 'state' => [
761 + 'required' => false,
762 + ],
763 + 'city' => [
764 + 'required' => false,
765 + ],
766 + ],
767 + 'SK' => [
768 + 'state' => [
769 + 'required' => false,
770 + 'hidden' => true,
771 + ],
772 + ],
773 + 'SI' => [
774 + 'state' => [
775 + 'required' => false,
776 + 'hidden' => true,
777 + ],
778 + ],
779 + 'ES' => [
780 + 'state' => [
781 + 'label' => __( 'Province', 'give' ),
782 + ],
783 + ],
784 + 'LI' => [
785 + 'state' => [
786 + 'label' => __( 'Municipality', 'give' ),
787 + 'required' => false,
788 + 'hidden' => true,
789 + ],
790 + ],
791 + 'LK' => [
792 + 'state' => [
793 + 'required' => false,
794 + ],
795 + ],
796 + 'SE' => [
797 + 'state' => [
798 + 'required' => false,
799 + 'hidden' => true,
800 + ],
801 + ],
802 + 'TR' => [
803 + 'state' => [
804 + 'label' => __( 'Province', 'give' ),
805 + ],
806 + ],
807 + 'US' => [
808 + 'state' => [
809 + 'label' => __( 'State', 'give' ),
810 + ],
811 + ],
812 + 'GB' => [
813 + 'state' => [
814 + 'label' => __( 'County', 'give' ),
815 + 'required' => false,
816 + ],
817 + ],
818 + 'VN' => [
819 + 'state' => [
820 + 'required' => false,
821 + 'hidden' => true,
822 + ],
823 + ],
824 + 'YT' => [
825 + 'state' => [
826 + 'required' => false,
827 + ],
828 + ],
829 + 'ZA' => [
830 + 'state' => [
831 + 'label' => __( 'Province', 'give' ),
832 + ],
833 + ],
834 + 'PA' => [
835 + 'state' => [
836 + 'required' => true,
837 + ],
838 + ],
839 + ]
840 + );
827 841 }
828 842
829 843 /**
830 844 * Get Turkey States
@@ -832,9 +846,9 @@
832 846 * @since 1.8.12
833 847 * @return array $states A list of states
834 848 */
835 849 function give_get_turkey_states_list() {
836 - $states = array(
850 + $states = [
837 851 '' => '',
838 852 'TR01' => __( 'Adana', 'give' ),
839 853 'TR02' => __( 'Adıyaman', 'give' ),
840 854 'TR03' => __( 'Afyon', 'give' ),
@@ -915,9 +929,9 @@
915 929 'TR78' => __( 'Karabük', 'give' ),
916 930 'TR79' => __( 'Kilis', 'give' ),
917 931 'TR80' => __( 'Osmaniye', 'give' ),
918 932 'TR81' => __( 'Düzce', 'give' ),
919 - );
933 + ];
920 934
921 935 return apply_filters( 'give_turkey_states', $states );
922 936 }
923 937
@@ -927,9 +941,9 @@
927 941 * @since 1.8.12
928 942 * @return array $states A list of states
929 943 */
930 944 function give_get_romania_states_list() {
931 - $states = array(
945 + $states = [
932 946 '' => '',
933 947 'AB' => __( 'Alba', 'give' ),
934 948 'AR' => __( 'Arad', 'give' ),
935 949 'AG' => __( 'Arges', 'give' ),
@@ -971,9 +985,9 @@
971 985 'TL' => __( 'Tulcea', 'give' ),
972 986 'VL' => __( 'Valcea', 'give' ),
973 987 'VS' => __( 'Vaslui', 'give' ),
974 988 'VN' => __( 'Vrancea', 'give' ),
975 - );
989 + ];
976 990
977 991 return apply_filters( 'give_romania_states', $states );
978 992 }
979 993
@@ -983,9 +997,9 @@
983 997 * @since 1.8.12
984 998 * @return array $states A list of states
985 999 */
986 1000 function give_get_pakistan_states_list() {
987 - $states = array(
1001 + $states = [
988 1002 '' => '',
989 1003 'JK' => __( 'Azad Kashmir', 'give' ),
990 1004 'BA' => __( 'Balochistan', 'give' ),
991 1005 'TA' => __( 'FATA', 'give' ),
@@ -993,9 +1007,9 @@
993 1007 'IS' => __( 'Islamabad Capital Territory', 'give' ),
994 1008 'KP' => __( 'Khyber Pakhtunkhwa', 'give' ),
995 1009 'PB' => __( 'Punjab', 'give' ),
996 1010 'SD' => __( 'Sindh', 'give' ),
997 - );
1011 + ];
998 1012
999 1013 return apply_filters( 'give_pakistan_states', $states );
1000 1014 }
1001 1015
@@ -1005,9 +1019,9 @@
1005 1019 * @since 1.8.12
1006 1020 * @return array $states A list of states
1007 1021 */
1008 1022 function give_get_philippines_states_list() {
1009 - $states = array(
1023 + $states = [
1010 1024 '' => '',
1011 1025 'ABR' => __( 'Abra', 'give' ),
1012 1026 'AGN' => __( 'Agusan del Norte', 'give' ),
1013 1027 'AGS' => __( 'Agusan del Sur', 'give' ),
@@ -1089,9 +1103,9 @@
1089 1103 'ZAN' => __( 'Zamboanga del Norte', 'give' ),
1090 1104 'ZAS' => __( 'Zamboanga del Sur', 'give' ),
1091 1105 'ZSI' => __( 'Zamboanga Sibugay', 'give' ),
1092 1106 '00' => __( 'Metro Manila', 'give' ),
1093 - );
1107 + ];
1094 1108
1095 1109 return apply_filters( 'give_philippines_states', $states );
1096 1110 }
1097 1111
@@ -1101,9 +1115,9 @@
1101 1115 * @since 1.8.12
1102 1116 * @return array $states A list of states
1103 1117 */
1104 1118 function give_get_peru_states_list() {
1105 - $states = array(
1119 + $states = [
1106 1120 '' => '',
1107 1121 'CAL' => __( 'El Callao', 'give' ),
1108 1122 'LMA' => __( 'Municipalidad Metropolitana de Lima', 'give' ),
1109 1123 'AMA' => __( 'Amazonas', 'give' ),
@@ -1129,9 +1143,9 @@
1129 1143 'SAM' => __( 'San Martín', 'give' ),
1130 1144 'TAC' => __( 'Tacna', 'give' ),
1131 1145 'TUM' => __( 'Tumbes', 'give' ),
1132 1146 'UCA' => __( 'Ucayali', 'give' ),
1133 - );
1147 + ];
1134 1148
1135 1149 return apply_filters( 'give_peru_states', $states );
1136 1150 }
1137 1151
@@ -1141,9 +1155,9 @@
1141 1155 * @since 1.8.12
1142 1156 * @return array $states A list of states
1143 1157 */
1144 1158 function give_get_nepal_states_list() {
1145 - $states = array(
1159 + $states = [
1146 1160 '' => '',
1147 1161 'BAG' => __( 'Bagmati', 'give' ),
1148 1162 'BHE' => __( 'Bheri', 'give' ),
1149 1163 'DHA' => __( 'Dhaulagiri', 'give' ),
@@ -1157,9 +1171,9 @@
1157 1171 'NAR' => __( 'Narayani', 'give' ),
1158 1172 'RAP' => __( 'Rapti', 'give' ),
1159 1173 'SAG' => __( 'Sagarmatha', 'give' ),
1160 1174 'SET' => __( 'Seti', 'give' ),
1161 - );
1175 + ];
1162 1176
1163 1177 return apply_filters( 'give_nepal_states', $states );
1164 1178 }
1165 1179
@@ -1169,9 +1183,9 @@
1169 1183 * @since 1.8.12
1170 1184 * @return array $states A list of states
1171 1185 */
1172 1186 function give_get_nigerian_states_list() {
1173 - $states = array(
1187 + $states = [
1174 1188 '' => '',
1175 1189 'AB' => __( 'Abia', 'give' ),
1176 1190 'FC' => __( 'Abuja', 'give' ),
1177 1191 'AD' => __( 'Adamawa', 'give' ),
@@ -1208,9 +1222,9 @@
1208 1222 'SO' => __( 'Sokoto', 'give' ),
1209 1223 'TA' => __( 'Taraba', 'give' ),
1210 1224 'YO' => __( 'Yobe', 'give' ),
1211 1225 'ZA' => __( 'Zamfara', 'give' ),
1212 - );
1226 + ];
1213 1227
1214 1228 return apply_filters( 'give_nigerian_states', $states );
1215 1229 }
1216 1230
@@ -1220,9 +1234,9 @@
1220 1234 * @since 1.8.12
1221 1235 * @return array $states A list of states
1222 1236 */
1223 1237 function give_get_mexico_states_list() {
1224 - $states = array(
1238 + $states = [
1225 1239 '' => '',
1226 1240 'Distrito Federal' => __( 'Distrito Federal', 'give' ),
1227 1241 'Jalisco' => __( 'Jalisco', 'give' ),
1228 1242 'Nuevo Leon' => __( 'Nuevo León', 'give' ),
@@ -1254,9 +1268,9 @@
1254 1268 'Tlaxcala' => __( 'Tlaxcala', 'give' ),
1255 1269 'Veracruz' => __( 'Veracruz', 'give' ),
1256 1270 'Yucatan' => __( 'Yucatán', 'give' ),
1257 1271 'Zacatecas' => __( 'Zacatecas', 'give' ),
1258 - );
1272 + ];
1259 1273
1260 1274 return apply_filters( 'give_mexico_states', $states );
1261 1275 }
1262 1276
@@ -1266,9 +1280,9 @@
1266 1280 * @since 1.8.12
1267 1281 * @return array $states A list of states
1268 1282 */
1269 1283 function give_get_japan_states_list() {
1270 - $states = array(
1284 + $states = [
1271 1285 '' => '',
1272 1286 'JP01' => __( 'Hokkaido', 'give' ),
1273 1287 'JP02' => __( 'Aomori', 'give' ),
1274 1288 'JP03' => __( 'Iwate', 'give' ),
@@ -1315,9 +1329,9 @@
1315 1329 'JP44' => __( 'Oita', 'give' ),
1316 1330 'JP45' => __( 'Miyazaki', 'give' ),
1317 1331 'JP46' => __( 'Kagoshima', 'give' ),
1318 1332 'JP47' => __( 'Okinawa', 'give' ),
1319 - );
1333 + ];
1320 1334
1321 1335 return apply_filters( 'give_japan_states', $states );
1322 1336 }
1323 1337
@@ -1327,9 +1341,9 @@
1327 1341 * @since 1.8.12
1328 1342 * @return array $states A list of states
1329 1343 */
1330 1344 function give_get_italy_states_list() {
1331 - $states = array(
1345 + $states = [
1332 1346 '' => '',
1333 1347 'AG' => __( 'Agrigento', 'give' ),
1334 1348 'AL' => __( 'Alessandria', 'give' ),
1335 1349 'AN' => __( 'Ancona', 'give' ),
@@ -1439,9 +1453,9 @@
1439 1453 'VR' => __( 'Verona', 'give' ),
1440 1454 'VV' => __( 'Vibo Valentia', 'give' ),
1441 1455 'VI' => __( 'Vicenza', 'give' ),
1442 1456 'VT' => __( 'Viterbo', 'give' ),
1443 - );
1457 + ];
1444 1458
1445 1459 return apply_filters( 'give_italy_states', $states );
1446 1460 }
1447 1461
@@ -1451,9 +1465,9 @@
1451 1465 * @since 1.8.12
1452 1466 * @return array $states A list of states
1453 1467 */
1454 1468 function give_get_iran_states_list() {
1455 - $states = array(
1469 + $states = [
1456 1470 '' => '',
1457 1471 'KHZ' => __( 'Khuzestan (خوزستان)', 'give' ),
1458 1472 'THR' => __( 'Tehran (تهران)', 'give' ),
1459 1473 'ILM' => __( 'Ilaam (ایلام)', 'give' ),
@@ -1484,9 +1498,9 @@
1484 1498 'MZN' => __( 'Mazandaran (مازندران)', 'give' ),
1485 1499 'MKZ' => __( 'Markazi (مرکزی)', 'give' ),
1486 1500 'HRZ' => __( 'Hormozgan (هرمزگان)', 'give' ),
1487 1501 'SBN' => __( 'Sistan and Baluchestan (سیستان و بلوچستان)', 'give' ),
1488 - );
1502 + ];
1489 1503
1490 1504 return apply_filters( 'give_iran_states', $states );
1491 1505 }
1492 1506
@@ -1496,10 +1510,12 @@
1496 1510 * @since 1.8.12
1497 1511 * @return array $states A list of states
1498 1512 */
1499 1513 function give_get_ireland_states_list() {
1500 - $states = array(
1514 + $states = [
1501 1515 '' => '',
1516 + 'AN' => __( 'Antrim', 'give' ),
1517 + 'AR' => __( 'Armagh', 'give' ),
1502 1518 'CE' => __( 'Clare', 'give' ),
1503 1519 'CK' => __( 'Cork', 'give' ),
1504 1520 'CN' => __( 'Cavan', 'give' ),
1505 1521 'CW' => __( 'Carlow', 'give' ),
@@ -1504,8 +1520,11 @@
1504 1520 'CN' => __( 'Cavan', 'give' ),
1505 1521 'CW' => __( 'Carlow', 'give' ),
1506 1522 'DL' => __( 'Donegal', 'give' ),
1507 1523 'DN' => __( 'Dublin', 'give' ),
1524 + 'DO' => __( 'Down', 'give' ),
1525 + 'DY' => __( 'Derry', 'give' ),
1526 + 'FM' => __( 'Fermanagh', 'give' ),
1508 1527 'GY' => __( 'Galway', 'give' ),
1509 1528 'KE' => __( 'Kildare', 'give' ),
1510 1529 'KK' => __( 'Kilkenny', 'give' ),
1511 1530 'KY' => __( 'Kerry', 'give' ),
@@ -1519,14 +1538,15 @@
1519 1538 'MO' => __( 'Mayo', 'give' ),
1520 1539 'OY' => __( 'Offaly', 'give' ),
1521 1540 'RN' => __( 'Roscommon', 'give' ),
1522 1541 'SO' => __( 'Sligo', 'give' ),
1542 + 'TR' => __( 'Tyrone', 'give' ),
1523 1543 'TY' => __( 'Tipperary', 'give' ),
1524 1544 'WD' => __( 'Waterford', 'give' ),
1525 1545 'WH' => __( 'Westmeath', 'give' ),
1526 1546 'WW' => __( 'Wicklow', 'give' ),
1527 1547 'WX' => __( 'Wexford', 'give' ),
1528 - );
1548 + ];
1529 1549
1530 1550 return apply_filters( 'give_ireland_states', $states );
1531 1551 }
1532 1552
@@ -1536,9 +1556,9 @@
1536 1556 * @since 1.8.12
1537 1557 * @return array $states A list of states
1538 1558 */
1539 1559 function give_get_greek_states_list() {
1540 - $states = array(
1560 + $states = [
1541 1561 '' => '',
1542 1562 'I' => __( 'Αττική', 'give' ),
1543 1563 'A' => __( 'Ανατολική Μακεδονία και Θράκη', 'give' ),
1544 1564 'B' => __( 'Κεντρική Μακεδονία', 'give' ),
@@ -1551,9 +1571,9 @@
1551 1571 'J' => __( 'Πελοπόννησος', 'give' ),
1552 1572 'K' => __( 'Βόρειο Αιγαίο', 'give' ),
1553 1573 'L' => __( 'Νότιο Αιγαίο', 'give' ),
1554 1574 'M' => __( 'Κρήτη', 'give' ),
1555 - );
1575 + ];
1556 1576
1557 1577 return apply_filters( 'give_greek_states', $states );
1558 1578 }
1559 1579
@@ -1563,9 +1583,9 @@
1563 1583 * @since 1.8.12
1564 1584 * @return array $states A list of states
1565 1585 */
1566 1586 function give_get_bolivian_states_list() {
1567 - $states = array(
1587 + $states = [
1568 1588 '' => '',
1569 1589 'B' => __( 'Chuquisaca', 'give' ),
1570 1590 'H' => __( 'Beni', 'give' ),
1571 1591 'C' => __( 'Cochabamba', 'give' ),
@@ -1574,9 +1594,9 @@
1574 1594 'N' => __( 'Pando', 'give' ),
1575 1595 'P' => __( 'Potosí', 'give' ),
1576 1596 'S' => __( 'Santa Cruz', 'give' ),
1577 1597 'T' => __( 'Tarija', 'give' ),
1578 - );
1598 + ];
1579 1599
1580 1600 return apply_filters( 'give_bolivian_states', $states );
1581 1601 }
1582 1602
@@ -1586,9 +1606,9 @@
1586 1606 * @since 1.8.12
1587 1607 * @return array $states A list of states
1588 1608 */
1589 1609 function give_get_bulgarian_states_list() {
1590 - $states = array(
1610 + $states = [
1591 1611 '' => '',
1592 1612 'BG-01' => __( 'Blagoevgrad', 'give' ),
1593 1613 'BG-02' => __( 'Burgas', 'give' ),
1594 1614 'BG-08' => __( 'Dobrich', 'give' ),
@@ -1616,9 +1636,9 @@
1616 1636 'BG-04' => __( 'Veliko Tarnovo', 'give' ),
1617 1637 'BG-05' => __( 'Vidin', 'give' ),
1618 1638 'BG-06' => __( 'Vratsa', 'give' ),
1619 1639 'BG-28' => __( 'Yambol', 'give' ),
1620 - );
1640 + ];
1621 1641
1622 1642 return apply_filters( 'give_bulgarian_states', $states );
1623 1643 }
1624 1644
@@ -1628,9 +1648,9 @@
1628 1648 * @since 1.8.12.
1629 1649 * @return array $states A list of states
1630 1650 */
1631 1651 function give_get_bangladeshi_states_list() {
1632 - $states = array(
1652 + $states = [
1633 1653 '' => '',
1634 1654 'BAG' => __( 'Bagerhat', 'give' ),
1635 1655 'BAN' => __( 'Bandarban', 'give' ),
1636 1656 'BAR' => __( 'Barguna', 'give' ),
@@ -1694,9 +1714,9 @@
1694 1714 'SUN' => __( 'Sunamganj', 'give' ),
1695 1715 'SYL' => __( 'Sylhet', 'give' ),
1696 1716 'TAN' => __( 'Tangail', 'give' ),
1697 1717 'THA' => __( 'Thakurgaon', 'give' ),
1698 - );
1718 + ];
1699 1719
1700 1720 return apply_filters( 'give_bangladeshi_states', $states );
1701 1721 }
1702 1722
@@ -1706,9 +1726,9 @@
1706 1726 * @since 1.8.12
1707 1727 * @return array $states A list of states
1708 1728 */
1709 1729 function give_get_argentina_states_list() {
1710 - $states = array(
1730 + $states = [
1711 1731 '' => '',
1712 1732 'C' => __( 'Ciudad Autónoma de Buenos Aires', 'give' ),
1713 1733 'B' => __( 'Buenos Aires', 'give' ),
1714 1734 'K' => __( 'Catamarca', 'give' ),
@@ -1732,9 +1752,9 @@
1732 1752 'S' => __( 'Santa Fe', 'give' ),
1733 1753 'G' => __( 'Santiago del Estero', 'give' ),
1734 1754 'V' => __( 'Tierra del Fuego', 'give' ),
1735 1755 'T' => __( 'Tucumán', 'give' ),
1736 - );
1756 + ];
1737 1757
1738 1758 return apply_filters( 'give_argentina_states', $states );
1739 1759 }
1740 1760
@@ -1745,9 +1765,9 @@
1745 1765 * @since 1.2
1746 1766 * @return array
1747 1767 */
1748 1768 function give_get_states_list() {
1749 - $states = array(
1769 + $states = [
1750 1770 '' => '',
1751 1771 'AL' => 'Alabama',
1752 1772 'AK' => 'Alaska',
1753 1773 'AZ' => 'Arizona',
@@ -1813,9 +1833,9 @@
1813 1833 'VI' => 'Virgin Islands',
1814 1834 'AA' => 'Armed Forces - Americas',
1815 1835 'AE' => 'Armed Forces - Europe, Canada, Middle East, Africa',
1816 1836 'AP' => 'Armed Forces - Pacific',
1817 - );
1837 + ];
1818 1838
1819 1839 return apply_filters( 'give_us_states', $states );
1820 1840 }
1821 1841
@@ -1826,9 +1846,9 @@
1826 1846 * @since 1.0
1827 1847 * @return array
1828 1848 */
1829 1849 function give_get_provinces_list() {
1830 - $provinces = array(
1850 + $provinces = [
1831 1851 '' => '',
1832 1852 'AB' => esc_html__( 'Alberta', 'give' ),
1833 1853 'BC' => esc_html__( 'British Columbia', 'give' ),
1834 1854 'MB' => esc_html__( 'Manitoba', 'give' ),
@@ -1841,9 +1861,9 @@
1841 1861 'PE' => esc_html__( 'Prince Edward Island', 'give' ),
1842 1862 'QC' => esc_html__( 'Quebec', 'give' ),
1843 1863 'SK' => esc_html__( 'Saskatchewan', 'give' ),
1844 1864 'YT' => esc_html__( 'Yukon', 'give' ),
1845 - );
1865 + ];
1846 1866
1847 1867 return apply_filters( 'give_canada_provinces', $provinces );
1848 1868 }
1849 1869
@@ -1853,9 +1873,9 @@
1853 1873 * @since 1.0
1854 1874 * @return array $states A list of states
1855 1875 */
1856 1876 function give_get_australian_states_list() {
1857 - $states = array(
1877 + $states = [
1858 1878 '' => '',
1859 1879 'ACT' => 'Australian Capital Territory',
1860 1880 'NSW' => 'New South Wales',
1861 1881 'NT' => 'Northern Territory',
@@ -1863,9 +1883,9 @@
1863 1883 'SA' => 'South Australia',
1864 1884 'TAS' => 'Tasmania',
1865 1885 'VIC' => 'Victoria',
1866 1886 'WA' => 'Western Australia',
1867 - );
1887 + ];
1868 1888
1869 1889 return apply_filters( 'give_australian_states', $states );
1870 1890 }
1871 1891
@@ -1875,9 +1895,9 @@
1875 1895 * @since 1.0
1876 1896 * @return array $states A list of states
1877 1897 */
1878 1898 function give_get_brazil_states_list() {
1879 - $states = array(
1899 + $states = [
1880 1900 '' => '',
1881 1901 'AC' => 'Acre',
1882 1902 'AL' => 'Alagoas',
1883 1903 'AP' => 'Amapá',
@@ -1904,9 +1924,9 @@
1904 1924 'SC' => 'Santa Catarina',
1905 1925 'SP' => 'São Paulo',
1906 1926 'SE' => 'Sergipe',
1907 1927 'TO' => 'Tocantins',
1908 - );
1928 + ];
1909 1929
1910 1930 return apply_filters( 'give_brazil_states', $states );
1911 1931 }
1912 1932
@@ -1916,14 +1936,14 @@
1916 1936 * @since 1.0
1917 1937 * @return array $states A list of states
1918 1938 */
1919 1939 function give_get_hong_kong_states_list() {
1920 - $states = array(
1940 + $states = [
1921 1941 '' => '',
1922 1942 'HONG KONG' => 'Hong Kong Island',
1923 1943 'KOWLOON' => 'Kowloon',
1924 1944 'NEW TERRITORIES' => 'New Territories',
1925 - );
1945 + ];
1926 1946
1927 1947 return apply_filters( 'give_hong_kong_states', $states );
1928 1948 }
1929 1949
@@ -1933,9 +1953,9 @@
1933 1953 * @since 1.0
1934 1954 * @return array $states A list of states
1935 1955 */
1936 1956 function give_get_hungary_states_list() {
1937 - $states = array(
1957 + $states = [
1938 1958 '' => '',
1939 1959 'BK' => 'Bács-Kiskun',
1940 1960 'BE' => 'Békés',
1941 1961 'BA' => 'Baranya',
@@ -1955,9 +1975,9 @@
1955 1975 'TO' => 'Tolna',
1956 1976 'VA' => 'Vas',
1957 1977 'VE' => 'Veszprém',
1958 1978 'ZA' => 'Zala',
1959 - );
1979 + ];
1960 1980
1961 1981 return apply_filters( 'give_hungary_states', $states );
1962 1982 }
1963 1983
@@ -1967,9 +1987,9 @@
1967 1987 * @since 1.0
1968 1988 * @return array $states A list of states
1969 1989 */
1970 1990 function give_get_chinese_states_list() {
1971 - $states = array(
1991 + $states = [
1972 1992 '' => '',
1973 1993 'CN1' => 'Yunnan / 云南',
1974 1994 'CN2' => 'Beijing / 北京',
1975 1995 'CN3' => 'Tianjin / 天津',
@@ -2001,9 +2021,9 @@
2001 2021 'CN29' => 'Ningxia Hui / 宁夏',
2002 2022 'CN30' => 'Macau / 澳门',
2003 2023 'CN31' => 'Tibet / 西藏',
2004 2024 'CN32' => 'Xinjiang / 新疆',
2005 - );
2025 + ];
2006 2026
2007 2027 return apply_filters( 'give_chinese_states', $states );
2008 2028 }
2009 2029
@@ -2013,9 +2033,9 @@
2013 2033 * @since 1.0
2014 2034 * @return array $states A list of states
2015 2035 */
2016 2036 function give_get_new_zealand_states_list() {
2017 - $states = array(
2037 + $states = [
2018 2038 '' => '',
2019 2039 'AK' => 'Auckland',
2020 2040 'BP' => 'Bay of Plenty',
2021 2041 'CT' => 'Canterbury',
@@ -2030,9 +2050,9 @@
2030 2050 'TM' => 'Tasman',
2031 2051 'WA' => 'Waikato',
2032 2052 'WE' => 'Wellington',
2033 2053 'WC' => 'West Coast',
2034 - );
2054 + ];
2035 2055
2036 2056 return apply_filters( 'give_new_zealand_states', $states );
2037 2057 }
2038 2058
@@ -2042,9 +2062,9 @@
2042 2062 * @since 1.0
2043 2063 * @return array $states A list of states
2044 2064 */
2045 2065 function give_get_indonesian_states_list() {
2046 - $states = array(
2066 + $states = [
2047 2067 '' => '',
2048 2068 'AC' => 'Daerah Istimewa Aceh',
2049 2069 'SU' => 'Sumatera Utara',
2050 2070 'SB' => 'Sumatera Barat',
@@ -2078,9 +2098,9 @@
2078 2098 'MA' => 'Maluku',
2079 2099 'MU' => 'Maluku Utara',
2080 2100 'PA' => 'Papua',
2081 2101 'PB' => 'Papua Barat',
2082 - );
2102 + ];
2083 2103
2084 2104 return apply_filters( 'give_indonesia_states', $states );
2085 2105 }
2086 2106
@@ -2086,13 +2106,19 @@
2086 2106
2087 2107 /**
2088 2108 * Get Indian States
2089 2109 *
2110 + * @link https://en.wikipedia.org/wiki/ISO_3166-2:IN
2111 + * @link https://www.iso.org/obp/ui/#iso:code:3166:IN
2112 + *
2113 + * @since 3.19.1 Changed subdivision code for Odisha (OD)
2114 + * @since 2.11.0 Renamed Indian state of Orissa to Odisha (#5826)
2090 2115 * @since 1.0
2116 + *
2091 2117 * @return array $states A list of states
2092 2118 */
2093 2119 function give_get_indian_states_list() {
2094 - $states = array(
2120 + $states = [
2095 2121 '' => '',
2096 2122 'AP' => 'Andhra Pradesh',
2097 2123 'AR' => 'Arunachal Pradesh',
2098 2124 'AS' => 'Assam',
@@ -2111,9 +2137,9 @@
2111 2137 'MN' => 'Manipur',
2112 2138 'ML' => 'Meghalaya',
2113 2139 'MZ' => 'Mizoram',
2114 2140 'NL' => 'Nagaland',
2115 - 'OR' => 'Orissa',
2141 + 'OD' => 'Odisha',
2116 2142 'PB' => 'Punjab',
2117 2143 'RJ' => 'Rajasthan',
2118 2144 'SK' => 'Sikkim',
2119 2145 'TN' => 'Tamil Nadu',
@@ -2128,9 +2154,9 @@
2128 2154 'DD' => 'Daman and Diu',
2129 2155 'DL' => 'Delhi',
2130 2156 'LD' => 'Lakshadweep',
2131 2157 'PY' => 'Pondicherry (Puducherry)',
2132 - );
2158 + ];
2133 2159
2134 2160 return apply_filters( 'give_indian_states', $states );
2135 2161 }
2136 2162
@@ -2140,9 +2166,9 @@
2140 2166 * @since 1.6
2141 2167 * @return array $states A list of states
2142 2168 */
2143 2169 function give_get_malaysian_states_list() {
2144 - $states = array(
2170 + $states = [
2145 2171 '' => '',
2146 2172 'JHR' => 'Johor',
2147 2173 'KDH' => 'Kedah',
2148 2174 'KTN' => 'Kelantan',
@@ -2158,9 +2184,9 @@
2158 2184 'TRG' => 'Terengganu',
2159 2185 'KUL' => 'W.P. Kuala Lumpur',
2160 2186 'LBN' => 'W.P. Labuan',
2161 2187 'PJY' => 'W.P. Putrajaya',
2162 - );
2188 + ];
2163 2189
2164 2190 return apply_filters( 'give_malaysian_states', $states );
2165 2191 }
2166 2192
@@ -2170,9 +2196,9 @@
2170 2196 * @since 1.6
2171 2197 * @return array $states A list of states
2172 2198 */
2173 2199 function give_get_south_african_states_list() {
2174 - $states = array(
2200 + $states = [
2175 2201 '' => '',
2176 2202 'EC' => 'Eastern Cape',
2177 2203 'FS' => 'Free State',
2178 2204 'GP' => 'Gauteng',
@@ -2181,9 +2207,9 @@
2181 2207 'MP' => 'Mpumalanga',
2182 2208 'NC' => 'Northern Cape',
2183 2209 'NW' => 'North West',
2184 2210 'WC' => 'Western Cape',
2185 - );
2211 + ];
2186 2212
2187 2213 return apply_filters( 'give_south_african_states', $states );
2188 2214 }
2189 2215
@@ -2193,9 +2219,9 @@
2193 2219 * @since 1.6
2194 2220 * @return array $states A list of states
2195 2221 */
2196 2222 function give_get_thailand_states_list() {
2197 - $states = array(
2223 + $states = [
2198 2224 '' => '',
2199 2225 'TH-37' => 'Amnat Charoen (อำนาจเจริญ)',
2200 2226 'TH-15' => 'Ang Thong (อ่างทอง)',
2201 2227 'TH-14' => 'Ayutthaya (พระนครศรีอยุธยา)',
@@ -2272,9 +2298,9 @@
2272 2298 'TH-61' => 'Uthai Thani (อุทัยธานี)',
2273 2299 'TH-53' => 'Uttaradit (อุตรดิตถ์)',
2274 2300 'TH-95' => 'Yala (ยะลา)',
2275 2301 'TH-35' => 'Yasothon (ยโสธร)',
2276 - );
2302 + ];
2277 2303
2278 2304 return apply_filters( 'give_thailand_states', $states );
2279 2305 }
2280 2306
@@ -2284,9 +2310,9 @@
2284 2310 * @since 1.0
2285 2311 * @return array $states A list of states
2286 2312 */
2287 2313 function give_get_spain_states_list() {
2288 - $states = array(
2314 + $states = [
2289 2315 '' => '',
2290 2316 'C' => esc_html__( 'A Coruña', 'give' ),
2291 2317 'VI' => esc_html__( 'Álava', 'give' ),
2292 2318 'AB' => esc_html__( 'Albacete', 'give' ),
@@ -2338,8 +2364,91 @@
2338 2364 'VA' => esc_html__( 'Valladolid', 'give' ),
2339 2365 'BI' => esc_html__( 'Bizkaia', 'give' ),
2340 2366 'ZA' => esc_html__( 'Zamora', 'give' ),
2341 2367 'Z' => esc_html__( 'Zaragoza', 'give' ),
2342 - );
2368 + ];
2343 2369
2344 2370 return apply_filters( 'give_spain_states', $states );
2371 +}
2372 +
2373 +/**
2374 + * Get Country List without postcodes
2375 + *
2376 + * @since 2.8.0
2377 + * @return array $countries A list of countries without postcodes.
2378 + */
2379 +function give_get_country_list_without_postcodes() {
2380 + $countries = [
2381 + 'AO' => esc_html__( 'Angola', 'give' ),
2382 + 'AG' => esc_html__( 'Antigua and Barbuda', 'give' ),
2383 + 'AW' => esc_html__( 'Aruba', 'give' ),
2384 + 'BS' => esc_html__( 'Bahamas', 'give' ),
2385 + 'BZ' => esc_html__( 'Belize', 'give' ),
2386 + 'BJ' => esc_html__( 'Benin', 'give' ),
2387 + 'BW' => esc_html__( 'Botswana', 'give' ),
2388 + 'BF' => esc_html__( 'Burkina Faso', 'give' ),
2389 + 'BI' => esc_html__( 'Burundi', 'give' ),
2390 + 'CM' => esc_html__( 'Cameroon', 'give' ),
2391 + 'CF' => esc_html__( 'Central African Republic', 'give' ),
2392 + 'KM' => esc_html__( 'Comoros', 'give' ),
2393 + 'CD' => esc_html__( 'Congo, Democratic People\'s Republic', 'give' ),
2394 + 'CG' => esc_html__( 'Congo, Republic of', 'give' ),
2395 + 'CK' => esc_html__( 'Cook Islands', 'give' ),
2396 + 'CI' => esc_html__( 'Cote d\'Ivoire', 'give' ),
2397 + 'DJ' => esc_html__( 'Djibouti', 'give' ),
2398 + 'DM' => esc_html__( 'Dominica', 'give' ),
2399 + 'GQ' => esc_html__( 'Equatorial Guinea', 'give' ),
2400 + 'ER' => esc_html__( 'Eritrea', 'give' ),
2401 + 'FJ' => esc_html__( 'Fiji', 'give' ),
2402 + 'TF' => esc_html__( 'French Southern Territories', 'give' ),
2403 + 'GM' => esc_html__( 'Gambia', 'give' ),
2404 + 'GH' => esc_html__( 'Ghana', 'give' ),
2405 + 'GD' => esc_html__( 'Grenada', 'give' ),
2406 + 'GN' => esc_html__( 'Guinea', 'give' ),
2407 + 'GY' => esc_html__( 'Guyana', 'give' ),
2408 + 'HK' => esc_html__( 'Hong Kong', 'give' ),
2409 + 'IE' => esc_html__( 'Ireland', 'give' ),
2410 + 'JM' => esc_html__( 'Jamaica', 'give' ),
2411 + 'KE' => esc_html__( 'Kenya', 'give' ),
2412 + 'KI' => esc_html__( 'Kiribati', 'give' ),
2413 + 'MO' => esc_html__( 'Macau', 'give' ),
2414 + 'MW' => esc_html__( 'Malawi', 'give' ),
2415 + 'ML' => esc_html__( 'Mali', 'give' ),
2416 + 'MR' => esc_html__( 'Mauritania', 'give' ),
2417 + 'MU' => esc_html__( 'Mauritius', 'give' ),
2418 + 'MS' => esc_html__( 'Montserrat', 'give' ),
2419 + 'NR' => esc_html__( 'Nauru', 'give' ),
2420 + 'AN' => esc_html__( 'Netherlands Antilles', 'give' ),
2421 + 'NU' => esc_html__( 'Niue', 'give' ),
2422 + 'KP' => esc_html__( 'North Korea', 'give' ),
2423 + 'PA' => esc_html__( 'Panama', 'give' ),
2424 + 'QA' => esc_html__( 'Qatar', 'give' ),
2425 + 'RW' => esc_html__( 'Rwanda', 'give' ),
2426 + 'KN' => esc_html__( 'Saint Kitts and Nevis', 'give' ),
2427 + 'LC' => esc_html__( 'Saint Lucia', 'give' ),
2428 + 'ST' => esc_html__( 'Sao Tome and Principe', 'give' ),
2429 + 'SC' => esc_html__( 'Seychelles', 'give' ),
2430 + 'SL' => esc_html__( 'Sierra Leone', 'give' ),
2431 + 'SB' => esc_html__( 'Solomon Islands', 'give' ),
2432 + 'SO' => esc_html__( 'Somalia', 'give' ),
2433 + 'ZA' => esc_html__( 'South Africa', 'give' ),
2434 + 'SR' => esc_html__( 'Suriname', 'give' ),
2435 + 'SY' => esc_html__( 'Syrian Arab Republic', 'give' ),
2436 + 'TZ' => esc_html__( 'Tanzania', 'give' ),
2437 + 'TK' => esc_html__( 'Tokelau', 'give' ),
2438 + 'TO' => esc_html__( 'Tonga', 'give' ),
2439 + 'TT' => esc_html__( 'Trinidad and Tobago', 'give' ),
2440 + 'TV' => esc_html__( 'Tuvalu', 'give' ),
2441 + 'UG' => esc_html__( 'Uganda', 'give' ),
2442 + 'AE' => esc_html__( 'United Arab Emirates', 'give' ),
2443 + 'VU' => esc_html__( 'Vanuatu', 'give' ),
2444 + 'YE' => esc_html__( 'Yemen', 'give' ),
2445 + 'ZW' => esc_html__( 'Zimbabwe', 'give' ),
2446 + ];
2447 +
2448 + /**
2449 + * Filter list of countries without postcodes
2450 + *
2451 + * @since 2.8.0
2452 + */
2453 + return (array) apply_filters( 'give_countries_without_postcodes', $countries );
2345 2454 }