cliff
8/31/2017 - 5:13 PM

Customize the states drop-down options available to Venues

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;
}