Last active
August 31, 2017 17:13
-
-
Save cliffordp/96d7cc914ce1479f4ea97733c8b5a5c4 to your computer and use it in GitHub Desktop.
Customize the states drop-down options available to Venues
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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