Skip to content

Instantly share code, notes, and snippets.

@georgeolaru
Created December 8, 2015 12:55
Show Gist options
  • Save georgeolaru/a35e3310558eb7ca3e34 to your computer and use it in GitHub Desktop.
Save georgeolaru/a35e3310558eb7ca3e34 to your computer and use it in GitHub Desktop.
Listable Map Localization
/**
* Force WPJM to fetch geolocation data based on current site language
*
* @param $url
* @param $raw_address
*
* @return string
*/
function listable_add_google_language_param( $url, $raw_address ) {
$url = add_query_arg( array( 'language' => get_locale() ), $url );
return $url;
}
add_filter( 'job_manager_geolocation_endpoint', 'listable_add_google_language_param', 10, 2 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment