You are here

function location_cck_locationapi in Location 6.3

Same name and namespace in other branches
  1. 5.3 contrib/location_cck/location_cck.module \location_cck_locationapi()
  2. 7.5 contrib/location_cck/location_cck.module \location_cck_locationapi()
  3. 7.3 contrib/location_cck/location_cck.module \location_cck_locationapi()
  4. 7.4 contrib/location_cck/location_cck.module \location_cck_locationapi()

Implementation of hook_locationapi().

File

contrib/location_cck/location_cck.module, line 529
Defines location field type.

Code

function location_cck_locationapi(&$obj, $op, $a3 = NULL, $a4 = NULL, $a5 = NULL) {
  switch ($op) {
    case 'instance_links':
      foreach ($obj as $k => $v) {
        if (substr($v['genid'], 0, 4) == 'cck:') {
          $data = explode(':', $v['genid']);
          $obj[$k]['href'] = 'node/' . $data[2];
          $obj[$k]['title'] = t('CCK location');
          $obj[$k]['type'] = t('CCK location');
        }
      }
  }
}