$72 GRAYBYTE WORDPRESS FILE MANAGER $18

SERVER : premium201.web-hosting.com #1 SMP Wed Mar 26 12:08:09 UTC 2025
SERVER IP : 104.21.15.130 | ADMIN IP 216.73.216.51
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : NONE

/home/bravetechrwanda/itiministry.org/plugins/give/src/DonorDashboards/Helpers/

HOME
Current File : /home/bravetechrwanda/itiministry.org/plugins/give/src/DonorDashboards/Helpers//LocationList.php
<?php

namespace Give\DonorDashboards\Helpers;

/**
 * Normalize format of location type lists.
 * 4.14.1 Replaces FormatObjectList with formatAsValueLabelPairs
 * @since 2.10.0
 */
class LocationList
{
    public static function getCountries(): array
    {
        $countries = give_get_country_list();
        unset($countries['']);

        return self::formatAsValueLabelPairs($countries);
    }

    public static function getStates($country): array
    {
        $states = give_get_states($country);
        $states[''] = sprintf('%s...', esc_html__('Select', 'give'));

        return self::formatAsValueLabelPairs($states);
    }

    /**
     * Formats an associative array as an array of value/label pairs for JS consumption.
     *
     * 4.14.1
     */
    private static function formatAsValueLabelPairs(array $data): array
    {
        return array_map(
            static function ($key, $value) {
                return [
                    'value' => $key,
                    'label' => $value,
                ];
            },
            array_keys($data),
            array_values($data)
        );
    }
}


Current_dir [ WRITEABLE ] Document_root [ NOT WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
25 May 2026 4.20 PM
bravetechrwanda / bravetechrwanda
0755
LocationList.php
1.104 KB
12 Feb 2026 12.13 AM
bravetechrwanda / bravetechrwanda
0644
SanitizeProfileData.php
1.813 KB
17 Jun 2022 4.03 AM
bravetechrwanda / bravetechrwanda
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2026 CONTACT ME
Static GIF Static GIF