Skip to content

Instantly share code, notes, and snippets.

@elimn
Created January 7, 2015 16:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save elimn/64805dd2bae1eb61f081 to your computer and use it in GitHub Desktop.
Save elimn/64805dd2bae1eb61f081 to your computer and use it in GitHub Desktop.
MT | TEC | Specify search area for Tribe Bar Location search
<?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