Skip to content

Instantly share code, notes, and snippets.

@travislima
Created October 20, 2016 09:14
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 travislima/3fc0fd49a290775903ea1ad74ecbe4e2 to your computer and use it in GitHub Desktop.
Save travislima/3fc0fd49a290775903ea1ad74ecbe4e2 to your computer and use it in GitHub Desktop.
WP Google Maps - Change default radius distance
<?php
/*This is the original piece of code that you will need to change. You can find this code in the wp-google-maps-pro.php file (Approx line: 7193)
$ret_msg .= " <option class=\"wpgmza_sl_select_option\" value=\"1\">".__("1km","wp-google-maps")."</option>";
$ret_msg .= " <option class=\"wpgmza_sl_select_option\" value=\"5\">".__("5km","wp-google-maps")."</option>";
$ret_msg .= " <option class=\"wpgmza_sl_select_option\" value=\"10\" selected>".__("10km","wp-google-maps")."</option>";
$ret_msg .= " <option class=\"wpgmza_sl_select_option\" value=\"25\">".__("25km","wp-google-maps")."</option>";
$ret_msg .= " <option class=\"wpgmza_sl_select_option\" value=\"50\">".__("50km","wp-google-maps")."</option>";
$ret_msg .= " <option class=\"wpgmza_sl_select_option\" value=\"75\">".__("75km","wp-google-maps")."</option>";
$ret_msg .= " <option class=\"wpgmza_sl_select_option\" value=\"100\">".__("100km","wp-google-maps")."</option>";
$ret_msg .= " <option class=\"wpgmza_sl_select_option\" value=\"150\">".__("150km","wp-google-maps")."</option>";
$ret_msg .= " <option class=\"wpgmza_sl_select_option\" value=\"200\">".__("200km","wp-google-maps")."</option>";
$ret_msg .= " <option class=\"wpgmza_sl_select_option\" value=\"300\">".__("300km","wp-google-maps")."</option>";
*/
// The code below is the code that you will need to change the above code to. Notice the change on line 28
//Please let me know if you need any assistance implementing this
$ret_msg .= " <option class=\"wpgmza_sl_select_option\" value=\"1\">".__("1km","wp-google-maps")."</option>";
$ret_msg .= " <option class=\"wpgmza_sl_select_option\" value=\"5\">".__("5km","wp-google-maps")."</option>";
$ret_msg .= " <option class=\"wpgmza_sl_select_option\" value=\"10\" >".__("10km","wp-google-maps")."</option>";
$ret_msg .= " <option class=\"wpgmza_sl_select_option\" value=\"25\">".__("25km","wp-google-maps")."</option>";
$ret_msg .= " <option class=\"wpgmza_sl_select_option\" value=\"50\">".__("50km","wp-google-maps")."</option>";
$ret_msg .= " <option class=\"wpgmza_sl_select_option\" value=\"75\">".__("75km","wp-google-maps")."</option>";
$ret_msg .= " <option class=\"wpgmza_sl_select_option\" value=\"100\">".__("100km","wp-google-maps")."</option>";
$ret_msg .= " <option class=\"wpgmza_sl_select_option\" value=\"150\">".__("150km","wp-google-maps")."</option>";
$ret_msg .= " <option class=\"wpgmza_sl_select_option\" value=\"200\">".__("200km","wp-google-maps")."</option>";
$ret_msg .= " <option class=\"wpgmza_sl_select_option\" value=\"300\" selected>".__("300km","wp-google-maps")."</option>";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment