Created
July 23, 2018 15:22
-
-
Save jesseeproductions/76263b2767c3e63a2c9084f3e5dcce4d to your computer and use it in GitHub Desktop.
Set Region and Language for Google Maps
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
/** | |
* 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