function ip_geoloc_save_map_options in IP Geolocation Views & Maps 7
Same name and namespace in other branches
- 8 ip_geoloc_blocks.inc \ip_geoloc_save_map_options()
 
Save map options to a Drupal variable.
Parameters
string $var_name: The variable name to save
string $map_options: The map options to save
1 call to ip_geoloc_save_map_options()
- ip_geoloc_block_save in ./
ip_geoloc_blocks.inc  - Implements hook_block_save().
 
File
- ./
ip_geoloc_blocks.inc, line 416  - Blocks available in IP Geolocation Views & Maps.
 
Code
function ip_geoloc_save_map_options($var_name, $map_options) {
  $map_options_decoded = drupal_json_decode($map_options);
  if ($map_options_decoded == NULL) {
    drupal_set_message(t("Sytax error in map options. These map options may not work: '%map_options'", array(
      '%map_options' => $map_options,
    )), 'warning');
  }
  variable_set($var_name, $map_options);
}