Created
January 7, 2015 16:59
-
-
Save elimn/64805dd2bae1eb61f081 to your computer and use it in GitHub Desktop.
MT | TEC | Specify search area for Tribe Bar Location search
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 | |
/* | |
* Set's Tec's preferred area for search results from the Location search in Tribe Bar | |
*/ | |
function tribe_set_geo_lookup_bounds ($localizations) { | |
// SW corner of your bounds rectangle | |
$localizations['geocenter']['max_lat'] = '49'; | |
$localizations['geocenter']['max_lng'] = '-8'; | |
// NE corner of your bounds rectangle | |
$localizations['geocenter']['min_lat'] = '60'; | |
$localizations['geocenter']['min_lng'] = '-3'; | |
return $localizations; | |
} | |
add_filter( 'tribe_events_pro_localize_script', 'tribe_set_geo_lookup_bounds' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment