Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Customize the states drop-down options available to Venues
<?php
/**
* Customize the states drop-down options available to Venues
*
* This example only allows Alaska and Hawaii
*
* @link https://gist.github.com/cliffordp/96d7cc914ce1479f4ea97733c8b5a5c4
**/
add_filter( 'tribe_get_state_options', 'cliff_custom_usa_states_list' );
function cliff_custom_usa_states_list() {
$custom_states = array(
'AK' => esc_html__( 'Alaska', 'tribe-common' ),
'HI' => esc_html__( 'Hawaii', 'tribe-common' ),
);
return $custom_states;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment