You are here

function _kml_feed in KML 5

Same name and namespace in other branches
  1. 6 kml.module \_kml_feed()

Displays a KML feed containing all location-enabled nodes.

2 calls to _kml_feed()
kml_interface in ./kml.module
Default callback
_kml_feed_check_cache in ./kml.module

File

./kml.module, line 604
KML Module

Code

function _kml_feed($nodes, $attributes = array(), $cid = FALSE) {
  $title = $attributes['title'] ? $attributes['title'] : variable_get('site_name', 'drupal');
  $link = $attributes['link'] ? $attributes['link'] : url('', NULL, NULL, TRUE);
  $description = $attributes['description'] ? $attributes['description'] : variable_get('site_mission', '');
  $channel['title'] = $title;
  $channel['link'] = $link;
  $channel['description'] = $description;
  $output = _kml_format_feed($nodes, $channel);
  if ($cid) {
    cache_set($cid, 'cache', serialize($output), time() + variable_get('kml_cache_lifetime', 3600));
  }
  _kml_send_feed($output);
}