Skip to content

Instantly share code, notes, and snippets.

@cliffordp
Last active August 31, 2017 17:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cliffordp/96d7cc914ce1479f4ea97733c8b5a5c4 to your computer and use it in GitHub Desktop.
Save cliffordp/96d7cc914ce1479f4ea97733c8b5a5c4 to your computer and use it in GitHub Desktop.
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