Description
This function returns an array containing all countries, with country code as key and the country name as label.
Usage
$countries = acfcs_get_countries();
Returns
array(
'BE' => 'Belgium',
'NL' => 'Netherlands'
)
This function makes use of a transient, called 'acfcs_countries'.
Arguments
- (bool) - $show_first (optional)
Whether to include an empty option (used for dropdowns) | default false. - (bool) - $show_labels (optional)
Whether to show a text in the first option (used for dropdowns) | default false. - (bool) - $force (optional)
Whether to bypass the stored country transient (or not) | default false.
Defined in
inc/acfcs-functions.php - line 19
Used in
- admin/acfcs-info.php - line 13
- admin/acfcs-search.php - line 13
- admin/acfcs-settings.php - line 10
- fields/acf-city-selector-v4.php - line 61
- fields/acf-city-selector-v5.php - line 84
- inc/acfcs-actions.php - line 13
- inc/acfcs-functions.php - line 19
- inc/acfcs-functions.php - line 437
- inc/acfcs-functions.php - line 507
- inc/acfcs-functions.php - line 794