Created
June 18, 2015 16:25
-
-
Save elimn/363cafc5edf7cc8e46e3 to your computer and use it in GitHub Desktop.
MT | TEC | Override the default country selected when adding events
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 | |
| /* | |
| * This will override the default country selected when adding events | |
| * If you want a frienly GUI for selecting all Venue/Organizer defaults, look at PRO's Default Settings Feature. | |
| * https://theeventscalendar.com/product/wordpress-events-calendar-pro/ | |
| */ | |
| class Tribe__Events__Default_Values_Override extends Tribe__Events__Default_Values { | |
| public function country() { | |
| return array('GB', 'United Kingdom'); | |
| } | |
| } | |
| function tribe_set_default_country( $value ) { | |
| return new Tribe__Events__Default_Values_Override; | |
| } | |
| add_filter( 'tribe_events_default_value_strategy', 'tribe_set_default_country', 100, 1 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment