geocode_handler_info

geocode/geocode.module, line 31

Versions
6
geocode_handler_info($field_type = NULL)

Return a list of all handlers that might geocode something for you.

▾ 4 functions call geocode_handler_info()

geocode in geocode/geocode.module
The Geocode API call.
geocode in geocode/geocode.module
The Geocode API call.
geocode_widget_available_fields in geocode/modules/geocode_widget/includes/geocode_widget.admin.inc
geocode_widget_available_fields in geocode/modules/geocode_widget/includes/geocode_widget.admin.inc

Code

<?php
function geocode_handler_info($field_type = NULL) {
  static $handlers;
  if (!$handlers) {
    module_load_include('inc', 'geocode', 'includes/geocode');
    $handlers = module_invoke_all('geocode_handler_info');
    drupal_alter('geocode_handlers', $handlers);
  }
  if ($field_type) {
    $field_handlers = $handlers;
    foreach($field_handlers as $i => $handler) {
      if (!in_array($field_type, $handler['field types'])) {
        unset($field_handlers[$i]);
      }
    }
    return $field_handlers;
  }
  return $handlers;
}
?>