Skip to content

Instantly share code, notes, and snippets.

@jesseeproductions
Created July 23, 2018 15:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save jesseeproductions/76263b2767c3e63a2c9084f3e5dcce4d to your computer and use it in GitHub Desktop.
Save jesseeproductions/76263b2767c3e63a2c9084f3e5dcce4d to your computer and use it in GitHub Desktop.
Set Region and Language for Google Maps
/**
* The Events Calendar - Set Region and Language for Google Maps
*
* Language Codes https://developers.google.com/maps/faq#languagesupport
* Region codes: https://developers.google.com/maps/documentation/javascript/geocoding#GeocodingRegionCodes
*/
add_filter( 'tribe_events_google_maps_api', 'tribe_add_google_map_region' );
add_filter( 'tribe_events_pro_google_maps_api', 'tribe_add_google_map_region' );
function tribe_add_google_map_region( $api_url ) {
$url = add_query_arg( array(
//'language' => 'ja',
'region' => 'GB',
), $api_url );
return $url;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment