Filter
rpress_hong_kong_states
On this page
Filters the list of states returned for Hong Kong.
Applied at the end of rpress_get_hong_kong_states_list(), which rpress_get_states() calls when the selected country is HK. The array maps a code to a display name (region code => name). Add, remove or rename entries to change what appears in the state selector for this country.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$states | array | Associative array of region code => name. |
Return value#
array. The list of states for Hong Kong.
Example#
function my_add_hong_kong_states( $states ) {
$states['XX'] = 'My Custom Region';
return $states;
}
add_filter( 'rpress_hong_kong_states', 'my_add_hong_kong_states' );
Source#
Applied in:
includes/country-functions.php(line 713), inrpress_get_hong_kong_states_list()
See also#
Was this page helpful?
