Created
September 13, 2019 23:28
-
-
Save messica/eb9d0b0bcc710289c51e9cc810e23493 to your computer and use it in GitHub Desktop.
Use Australian States in dropdown.
This file contains hidden or 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 | |
function my_pmpro_states_init() { | |
add_filter( 'pmpro_state_dropdowns', '__return_true' ); | |
add_filter( 'pmpro_states', 'my_pmpro_states' ); | |
} | |
add_action( 'init', 'my_pmpro_states_init' ); | |
function my_pmpro_states( $states ) { | |
$states = array( | |
'ACT' => 'Australian Capital Territory', | |
'NSW' => 'New South Wales', | |
'NT' => 'Northern Territory', | |
'QLD' => 'Queensland', | |
'SA' => 'South Australia', | |
'TAS' => 'Tasmania', | |
'VIC' => 'Victoria', | |
'WA' => 'Western Australia', | |
); | |
return $states; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment