Filter
rpress_countries
On this page
Filters the list of countries available in RestroPress.
Applied at the end of rpress_get_country_list(). The array maps two-letter country codes to country names and is used for country selectors and for resolving country names. Add or remove entries to change the available countries.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$countries | array | Associative array of country code => country name. |
Return value#
array. The country list.
Example#
function my_remove_country( $countries ) {
unset( $countries['AQ'] );
return $countries;
}
add_filter( 'rpress_countries', 'my_remove_country' );
Source#
Applied in:
includes/country-functions.php(line 390), inrpress_get_country_list()
See also#
Was this page helpful?
