Created
December 8, 2015 12:55
-
-
Save georgeolaru/a35e3310558eb7ca3e34 to your computer and use it in GitHub Desktop.
Listable Map Localization
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
/** | |
* 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